projects
/
akkoma
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
5992c25
)
Generate instance stats on startup
author
Mark Felder
<feld@FreeBSD.org>
Wed, 4 Mar 2020 19:33:26 +0000
(13:33 -0600)
committer
Mark Felder
<feld@FreeBSD.org>
Wed, 4 Mar 2020 19:33:26 +0000
(13:33 -0600)
lib/pleroma/stats.ex
patch
|
blob
|
history
diff --git
a/lib/pleroma/stats.ex
b/lib/pleroma/stats.ex
index 33f50dda89825f1e0d12b897a64aad430fc3bc59..4446562ac0b797fc28762cee480387796852b28d 100644
(file)
--- 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