Commit 927079e2 authored by Haelwenn's avatar Haelwenn

Merge branch 'fix/stats-on-startup' into 'develop'

Generate instance stats on startup

Closes #1598

See merge request pleroma/pleroma!2271
parents 9b740cfb ec3dc462
......@@ -39,6 +39,7 @@ The format is based on [Keep a Changelog](
- Logger: default log level changed from `warn` to `info`.
- Config mix task `migrate_to_db` truncates `config` table before migrating the config file.
- Default to `prepare: :unnamed` in the database configuration.
- Instance stats are now loaded on startup instead of being empty until next hourly job.
<summary>API Changes</summary>
......@@ -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
name: __MODULE__
......@@ -53,8 +44,8 @@ def get_peers do
def init(args) do
{:ok, args}
def init(_args) do
{:ok, get_stat_data()}
def handle_call(:force_update, _from, _state) do
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment