cat-bookmarker/deps/phoenix_pubsub/lib/phoenix/pubsub/application.ex

19 lines
385 B
Elixir
Raw Normal View History

2024-03-10 18:52:04 +00:00
defmodule Phoenix.PubSub.Application do
@moduledoc false
use Application
def start(_, _) do
children = pg_children()
Supervisor.start_link(children, strategy: :one_for_one)
end
if Code.ensure_loaded?(:pg) do
defp pg_children() do
[%{id: :pg, start: {:pg, :start_link, [Phoenix.PubSub]}}]
end
else
defp pg_children() do
[]
end
end
end