Skip to content

Commit 15237d9

Browse files
committed
reformat
1 parent 7802b28 commit 15237d9

1 file changed

Lines changed: 9 additions & 9 deletions

File tree

lib/plausible/application.ex

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@ defmodule Plausible.Application do
2222
]
2323

2424
opts = [strategy: :one_for_one, name: Plausible.Supervisor]
25-
setup_sentry()
2625
setup_opentelemetry()
26+
setup_sentry()
2727
setup_cache_stats()
2828
Location.load_all()
2929
Application.put_env(:plausible, :server_start, Timex.now())
@@ -35,6 +35,14 @@ defmodule Plausible.Application do
3535
:ok
3636
end
3737

38+
defp setup_cache_stats() do
39+
conf = Application.get_env(:plausible, :user_agent_cache)
40+
41+
if conf[:stats] do
42+
:timer.apply_interval(1000 * 10, Plausible.Application, :report_cache_stats, [])
43+
end
44+
end
45+
3846
def setup_sentry() do
3947
Logger.add_backend(Sentry.LoggerBackend)
4048

@@ -53,14 +61,6 @@ defmodule Plausible.Application do
5361
OpentelemetryOban.setup()
5462
end
5563

56-
defp setup_cache_stats() do
57-
conf = Application.get_env(:plausible, :user_agent_cache)
58-
59-
if conf[:stats] do
60-
:timer.apply_interval(1000 * 10, Plausible.Application, :report_cache_stats, [])
61-
end
62-
end
63-
6464
def report_cache_stats() do
6565
case Cachex.stats(:user_agents) do
6666
{:ok, stats} ->

0 commit comments

Comments
 (0)