Skip to content

Open source, privacy-first web analytics. Lightweight, cookie-free Google Analytics alternative. Self-hosted or cloud.

Reorder application supervision tree (#5057)

hq1d2e0dcd2b4f4
diff --git a/lib/plausible/application.ex b/lib/plausible/application.ex
index c8bbf2f916..abd60bfc4a 100644
--- a/lib/plausible/application.ex
+++ b/lib/plausible/application.ex
@@ -15,22 +15,14 @@ defmodule Plausible.Application do
children =
[
- Plausible.PromEx,
Plausible.Cache.Stats,
+ Plausible.PromEx,
+ {Plausible.Auth.TOTP.Vault, key: totp_vault_key()},
Plausible.Repo,
Plausible.ClickhouseRepo,
Plausible.IngestRepo,
Plausible.AsyncInsertRepo,
Plausible.ImportDeletionRepo,
- {Plausible.Auth.TOTP.Vault, key: totp_vault_key()},
- {Plausible.RateLimit, clean_period: :timer.minutes(10)},
- Plausible.Ingestion.Counters,
- {Finch, name: Plausible.Finch, pools: finch_pool_config()},
- {Phoenix.PubSub, name: Plausible.PubSub},
- Plausible.Session.Salts,
- Supervisor.child_spec(Plausible.Event.WriteBuffer, id: Plausible.Event.WriteBuffer),
- Supervisor.child_spec(Plausible.Session.WriteBuffer, id: Plausible.Session.WriteBuffer),
- ReferrerBlocklist,
Plausible.Cache.Adapter.child_spec(:customer_currency, :cache_customer_currency,
ttl_check_interval: :timer.minutes(5),
global_ttl: :timer.minutes(60)
@@ -103,6 +95,14 @@ defmodule Plausible.Application do
]
)
end,
+ Plausible.Ingestion.Counters,
+ Plausible.Session.Salts,
+ Supervisor.child_spec(Plausible.Event.WriteBuffer, id: Plausible.Event.WriteBuffer),
+ Supervisor.child_spec(Plausible.Session.WriteBuffer, id: Plausible.Session.WriteBuffer),
+ ReferrerBlocklist,
+ {Plausible.RateLimit, clean_period: :timer.minutes(10)},
+ {Finch, name: Plausible.Finch, pools: finch_pool_config()},
+ {Phoenix.PubSub, name: Plausible.PubSub},
endpoint,
{Oban, Application.get_env(:plausible, Oban)},
on_ee do