commit: da5d21a1cf6050e35bbc8637b2fc7c44a8476994
parent 840686ecd5b57a210415539d4f5cc1038d25e5ce
Author: Alexander Strizhakov <alex.strizhakov@gmail.com>
Date: Sat, 27 Feb 2021 09:39:15 +0300
don't use continue in Stats init for test env
Diffstat:
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/lib/pleroma/stats.ex b/lib/pleroma/stats.ex
@@ -23,7 +23,11 @@ defmodule Pleroma.Stats do
@impl true
def init(_args) do
- {:ok, nil, {:continue, :calculate_stats}}
+ if Pleroma.Config.get(:env) != :test do
+ {:ok, nil, {:continue, :calculate_stats}}
+ else
+ {:ok, calculate_stat_data()}
+ end
end
@doc "Performs update stats"