Files
rsh26_pool_example/lib/rsh26pool/application.ex
T
2026-07-04 18:05:14 +09:00

35 lines
1.0 KiB
Elixir

defmodule Rsh26pool.Application do
# See https://elixir.hexdocs.pm/Application.html
# for more information on OTP Applications
@moduledoc false
use Application
@impl true
def start(_type, _args) do
children = [
Rsh26poolWeb.Telemetry,
Rsh26pool.Repo,
{DNSCluster, query: Application.get_env(:rsh26pool, :dns_cluster_query) || :ignore},
{Phoenix.PubSub, name: Rsh26pool.PubSub},
# Start a worker by calling: Rsh26pool.Worker.start_link(arg)
# {Rsh26pool.Worker, arg},
# Start to serve requests, typically the last entry
Rsh26poolWeb.Endpoint
]
# See https://elixir.hexdocs.pm/Supervisor.html
# for other strategies and supported options
opts = [strategy: :one_for_one, name: Rsh26pool.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
Rsh26poolWeb.Endpoint.config_change(changed, removed)
:ok
end
end