diff options
author | Haelwenn <contact+git.pleroma.social@hacktivis.me> | 2020-03-05 07:25:23 +0000 |
---|---|---|
committer | Haelwenn <contact+git.pleroma.social@hacktivis.me> | 2020-03-05 07:25:23 +0000 |
commit | 927079e2ffa2b500e532f689821e09ce5f8e056a (patch) | |
tree | bad4b9c19a1593b4e38a1a17125a37907c2b9cf9 /lib | |
parent | 9b740cfb23e3bc507207e1971a2a168cdf1d23d3 (diff) | |
parent | ec3dc462ff34693a8290f7c86b2dfac5e4db9b86 (diff) | |
download | pleroma-927079e2ffa2b500e532f689821e09ce5f8e056a.tar.gz |
Merge branch 'fix/stats-on-startup' into 'develop'
Generate instance stats on startup
Closes #1598
See merge request pleroma/pleroma!2271
Diffstat (limited to 'lib')
-rw-r--r-- | lib/pleroma/stats.ex | 15 |
1 files changed, 3 insertions, 12 deletions
diff --git a/lib/pleroma/stats.ex b/lib/pleroma/stats.ex index 33f50dda8..4446562ac 100644 --- a/lib/pleroma/stats.ex +++ b/lib/pleroma/stats.ex @@ -10,19 +10,10 @@ defmodule Pleroma.Stats do use GenServer - @init_state %{ - peers: [], - stats: %{ - domain_count: 0, - status_count: 0, - user_count: 0 - } - } - def start_link(_) do GenServer.start_link( __MODULE__, - @init_state, + nil, name: __MODULE__ ) end @@ -53,8 +44,8 @@ defmodule Pleroma.Stats do peers end - def init(args) do - {:ok, args} + def init(_args) do + {:ok, get_stat_data()} end def handle_call(:force_update, _from, _state) do |