Establishing Supervision Strategies
Let's learn about some of the supervision strategies when we build a child spec.
As you’ll recall, when we build a child spec, we define the naming and lifecycle strategies our supervisors will apply to child processes. In general, this configuration code guides OTP in building the lifecycle.
Starting a worker
Let’s talk about what happens when we start a worker:
-
At startup, the worker will go down the list of child specs and start each of them using the child specs.
-
Some of those child specs will identify other supervisors or applications. Our
application.ex
child list has both. -
Application.start
then walks down a list of children and starts each ...