Et voila pourquoi....
Thomas WICKHAM
@radiothomas_
2019
%%--------------------------------------------------------------------
%% Description: Starts the ssh application. Default type
%% is temporary. see application(3)
%%--------------------------------------------------------------------
-spec start() -> ok | {error, term()}.
start() ->
start(temporary).
-spec start(Type) -> ok | {error, term()} when
Type :: permanent | transient | temporary .
start(Type) ->
case application:ensure_all_started(ssh, Type) of
{ok, _} ->
ok;
Other ->
Other
end.
defmodule Phoenix.Endpoint.Supervisor do
# This module contains the logic used by most functions in Phoenix.Endpoint
# as well the supervisor for sockets, adapters, watchers, etc.
@moduledoc false
require Logger
use Supervisor
alias Phoenix.Endpoint.{CowboyAdapter, Cowboy2Adapter}
@doc """
Starts the endpoint supervision tree.
"""
def start_link(otp_app, mod) do
case Supervisor.start_link(__MODULE__, {otp_app, mod}, name: mod) do
{:ok, _} = ok ->
warmup(mod)
ok
{:error, _} = error ->
error
end
end