Skip to content
Snippets Groups Projects
Commit cdb05633 authored by feld's avatar feld
Browse files

Generate instance stats on startup

parent 5992c256
No related branches found
No related tags found
No related merge requests found
......@@ -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 @@ def get_peers 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
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment