Skip to content
  • Sponsor
  • Notifications You must be signed in to change notification settings
  • Fork 1.2k
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 2518cd4

Browse files
authoredFeb 12, 2025··
Reorder application supervision tree (#5057)
* Reorder application supervision tree * Move TOTP vault to the top * Start Cache Stats emitters first
1 parent a7ff6fa commit 2518cd4

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed
 

‎lib/plausible/application.ex

+10-10
Original file line numberDiff line numberDiff line change
@@ -15,22 +15,14 @@ defmodule Plausible.Application do
1515

1616
children =
1717
[
18-
Plausible.PromEx,
1918
Plausible.Cache.Stats,
19+
Plausible.PromEx,
20+
{Plausible.Auth.TOTP.Vault, key: totp_vault_key()},
2021
Plausible.Repo,
2122
Plausible.ClickhouseRepo,
2223
Plausible.IngestRepo,
2324
Plausible.AsyncInsertRepo,
2425
Plausible.ImportDeletionRepo,
25-
{Plausible.Auth.TOTP.Vault, key: totp_vault_key()},
26-
{Plausible.RateLimit, clean_period: :timer.minutes(10)},
27-
Plausible.Ingestion.Counters,
28-
{Finch, name: Plausible.Finch, pools: finch_pool_config()},
29-
{Phoenix.PubSub, name: Plausible.PubSub},
30-
Plausible.Session.Salts,
31-
Supervisor.child_spec(Plausible.Event.WriteBuffer, id: Plausible.Event.WriteBuffer),
32-
Supervisor.child_spec(Plausible.Session.WriteBuffer, id: Plausible.Session.WriteBuffer),
33-
ReferrerBlocklist,
3426
Plausible.Cache.Adapter.child_spec(:customer_currency, :cache_customer_currency,
3527
ttl_check_interval: :timer.minutes(5),
3628
global_ttl: :timer.minutes(60)
@@ -103,6 +95,14 @@ defmodule Plausible.Application do
10395
]
10496
)
10597
end,
98+
Plausible.Ingestion.Counters,
99+
Plausible.Session.Salts,
100+
Supervisor.child_spec(Plausible.Event.WriteBuffer, id: Plausible.Event.WriteBuffer),
101+
Supervisor.child_spec(Plausible.Session.WriteBuffer, id: Plausible.Session.WriteBuffer),
102+
ReferrerBlocklist,
103+
{Plausible.RateLimit, clean_period: :timer.minutes(10)},
104+
{Finch, name: Plausible.Finch, pools: finch_pool_config()},
105+
{Phoenix.PubSub, name: Plausible.PubSub},
106106
endpoint,
107107
{Oban, Application.get_env(:plausible, Oban)},
108108
on_ee do

0 commit comments

Comments
 (0)
Please sign in to comment.