the problem is that when in Supervisor you try this:
children = [
{
DynamicSupervisor,
name: SomeName,
strategy: :one_for_one
},
{
DynamicSupervisor,
name: AnotherName,
strategy: :one_for_one
}
]
IEX show this message
Blockquote
Application papelito exited: Papelito.Application.start(:normal, ) returned an error: shutdown: failed to start child: Papelito.Supervisor.Root
** (EXIT) bad child specification, more than one child specification has the id: DynamicSupervisor.
If using maps as child specifications, make sure the :id keys are unique.
If using a module or {module, arg} as child, use Supervisor.child_spec/2 to change the :id, for example:
children = [
Supervisor.child_spec({MyWorker, arg}, id: :my_worker_1),
Supervisor.child_spec({MyWorker, arg}, id: :my_worker_2)
]
** (Mix) Could not start application papelito: Papelito.Application.start(:normal, ) returned an error: shutdown: failed to start child: Papelito.Supervisor.Root
** (EXIT) bad child specification, more than one child specification has the id: DynamicSupervisor.
If using maps as child specifications, make sure the :id keys are unique.
If using a module or {module, arg} as child, use Supervisor.child_spec/2 to change the :id, for example:
children = [
Supervisor.child_spec({MyWorker, arg}, id: :my_worker_1),
Supervisor.child_spec({MyWorker, arg}, id: :my_worker_2)
]