ПК
Просто я из Украины) и пришлось сдувать пыль с впн-ки просто чтобы отправить фидбэк
Size: a a a
ПК
ДК
ПК
Я
ПК
ПК
ДК
ПК
TF
TF
ME
def start(_type, _args) do
# List all child processes to be supervised
children = [
Grub.Repo,
{Grub.Producer, []},
{Grub.Statistic, []},
{Grub.ProxyServer, []},
]
workers = [
for i <- 1..@stages do
{Grub.Worker, id: i}
end
]
opts = [strategy: :one_for_one, name: Grub.Supervisor]
Supervisor.start_link(children ++ workers ++ [{Grub.Saver, [@stages]}], opts)
end
def child_spec(args) do
IO.inspect(args)
%{
id: args[:id],
start: {__MODULE__, :start_link, [args[:id]]},
restart: :permanent,
shutdown: 5_000,
type: :worker
}
end
ME
** (Mix) Could not start application grub: exited in: Grub.Application.start(:normal, [])
** (EXIT) an exception was raised:
** (ArgumentError) supervisors expect each child to be one of:
* a module
* a {module, arg} tuple
* a child specification as a map with at least the :id and :start fields
* or a tuple with 6 elements generated by Supervisor.Spec (deprecated)
Got: [{Grub.Worker, [id: 1]}, {Grub.Worker, [id: 2]}]
TT
TT
ME
** (Mix) Could not start application grub: exited in: Grub.Application.start(:normal, [])
** (EXIT) an exception was raised:
** (ArgumentError) supervisors expect each child to be one of:
* a module
* a {module, arg} tuple
* a child specification as a map with at least the :id and :start fields
* or a tuple with 6 elements generated by Supervisor.Spec (deprecated)
Got: [{Grub.Worker, [id: 1]}, {Grub.Worker, [id: 2]}]
I
ME
TF
TF
TF