I have a named Supervisorone that oversees many simple_one_for_oneworkers who do the job at regular intervals for each user on my system.
I want the application to run one worker for each user the Supervisorfirst time it starts, and I want the application to do the same if it Supervisorrestarts later, for any reason.
Currently, I start all children dynamically in a callback Application start(type, args), but if it reboots Supervisor, this will not cause all child processes to start.
How to ensure that all dynamic child workers start immediately after start / restart Supervisor?
(My application is in Elixir, but the same principles apply to Erlang.)
source
share