mark the workers as permanent or transient, so that if they fail they get restarted
restart
defines when a terminated child process must be restarted.
- A
permanent
child process is always restarted.- A
temporary
child process is never restarted (even when the supervisor's restart strategy isrest_for_one
orone_for_all
and a sibling's death causes thetemporary
process to be terminated).- A
transient
child process is restarted only if it terminates abnormally, that is, with another exit reason thannormal
,shutdown
, or{shutdown,Term}
. https://erlang.org/doc/man/supervisor.html