PG
Size: a a a
PG
AP
AP
PG
V
LL
strategy: :one_for_all
Supervisor.start_link(children, name: :my_supervisor, strategy: :one_for_all)
V
PG
V
Proc0
работает отдельно, процессы запускаемые по spec1
, spec2
вместеPG
V
PG
V
child_spec
и вынести туда?PG
{Supervisor, [[spec1, spec2], [strategy: :one_for_all, name: SupSup]]}
LL
def start_link(...) do
[
inner_sup(children),
other_proc
]
|> Superviso.start_link(strategy: :one_for_one)
end
def inner_sup(children) do
%{
type: :supervisor,
id: :inner_sup,
start: {Supervisor, :start_link, [children, [strategy: :one_for_all]]}
}
end
PG
V
def start_link(...) do
[
inner_sup(children),
other_proc
]
|> Superviso.start_link(strategy: :one_for_one)
end
def inner_sup(children) do
%{
type: :supervisor,
id: :inner_sup,
start: {Supervisor, :start_link, [children, [strategy: :one_for_all]]}
}
end
V
** (ArgumentError) The module Supervisor was given as a child to a supervisor
but it does not implement child_spec/1.
PG