2023-06-01 09:49:27 +00:00
|
|
|
defmodule Prymn.Application do
|
|
|
|
# See https://hexdocs.pm/elixir/Application.html
|
|
|
|
# for more information on OTP Applications
|
|
|
|
@moduledoc false
|
|
|
|
|
|
|
|
use Application
|
|
|
|
|
|
|
|
@impl true
|
|
|
|
def start(_type, _args) do
|
|
|
|
children = [
|
|
|
|
PrymnWeb.Telemetry,
|
|
|
|
Prymn.Repo,
|
2023-11-19 22:27:36 +00:00
|
|
|
{DNSCluster, query: Application.get_env(:prymn, :dns_cluster_query) || :ignore},
|
2023-06-01 09:49:27 +00:00
|
|
|
{Phoenix.PubSub, name: Prymn.PubSub},
|
|
|
|
{Finch, name: Prymn.Finch},
|
2023-12-14 12:27:05 +00:00
|
|
|
{Oban, Application.fetch_env!(:prymn, Oban)},
|
2024-02-01 21:54:23 +00:00
|
|
|
Prymn.Agents.Store,
|
2024-02-01 15:34:26 +00:00
|
|
|
Prymn.Messaging.ConnectionSupervisor,
|
2023-12-16 20:40:57 +00:00
|
|
|
{Task.Supervisor, name: Prymn.TaskSupervisor},
|
2023-11-19 22:27:36 +00:00
|
|
|
PrymnWeb.Endpoint
|
2023-06-01 09:49:27 +00:00
|
|
|
]
|
|
|
|
|
|
|
|
# See https://hexdocs.pm/elixir/Supervisor.html
|
|
|
|
# for other strategies and supported options
|
|
|
|
opts = [strategy: :one_for_one, name: Prymn.Supervisor]
|
|
|
|
Supervisor.start_link(children, opts)
|
|
|
|
end
|
|
|
|
|
|
|
|
# Tell Phoenix to update the endpoint configuration
|
|
|
|
# whenever the application is updated.
|
|
|
|
@impl true
|
|
|
|
def config_change(changed, _new, removed) do
|
|
|
|
PrymnWeb.Endpoint.config_change(changed, removed)
|
|
|
|
:ok
|
|
|
|
end
|
|
|
|
end
|