projects
/
akkoma
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
SideEffects: Test for notification creation.
[akkoma]
/
lib
/
pleroma
/
stats.ex
diff --git
a/lib/pleroma/stats.ex
b/lib/pleroma/stats.ex
index 771a06e325c102ab63699ab57f33d92fcad1a3e2..4446562ac0b797fc28762cee480387796852b28d 100644
(file)
--- a/
lib/pleroma/stats.ex
+++ b/
lib/pleroma/stats.ex
@@
-1,5
+1,5
@@
# Pleroma: A lightweight social networking server
# Pleroma: A lightweight social networking server
-# Copyright © 2017-20
19
Pleroma Authors <https://pleroma.social/>
+# Copyright © 2017-20
20
Pleroma Authors <https://pleroma.social/>
# SPDX-License-Identifier: AGPL-3.0-only
defmodule Pleroma.Stats do
# SPDX-License-Identifier: AGPL-3.0-only
defmodule Pleroma.Stats do
@@
-10,19
+10,10
@@
defmodule Pleroma.Stats do
use GenServer
use GenServer
- @init_state %{
- peers: [],
- stats: %{
- domain_count: 0,
- status_count: 0,
- user_count: 0
- }
- }
-
def start_link(_) do
GenServer.start_link(
__MODULE__,
def start_link(_) do
GenServer.start_link(
__MODULE__,
-
@init_state
,
+
nil
,
name: __MODULE__
)
end
name: __MODULE__
)
end
@@
-53,8
+44,8
@@
defmodule Pleroma.Stats do
peers
end
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
end
def handle_call(:force_update, _from, _state) do