1
0
mirror of https://git.pleroma.social/sjw/pleroma.git synced 2024-12-29 02:45:19 +01:00

Generate instance stats on startup

This commit is contained in:
Mark Felder 2020-03-04 13:33:26 -06:00
parent 5992c256ad
commit cdb05633a6

View File

@ -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