You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
analytics/lib/plausible/application.ex

29 lines
752 B
Elixir

defmodule Plausible.Application do
@moduledoc false
use Application
def start(_type, _args) do
children = [
Plausible.Repo,
Plausible.ClickhouseRepo,
PlausibleWeb.Endpoint,
Plausible.Event.WriteBuffer,
Plausible.Session.WriteBuffer,
Plausible.Session.Store,
Plausible.Session.Salts,
{Oban, Application.get_env(:plausible, Oban)}
]
opts = [strategy: :one_for_one, name: Plausible.Supervisor]
{:ok, _} = Logger.add_backend(Sentry.LoggerBackend)
Application.put_env(:plausible, :server_start, Timex.now())
Supervisor.start_link(children, opts)
end
def config_change(changed, _new, removed) do
PlausibleWeb.Endpoint.config_change(changed, removed)
:ok
end
end