A transient worker belongs in a supervision tree when normal termination is part of the expected workflow, but abnormal termination requires recovery. Configure it with restart: :transient in child_spec/1. section 9.1.6
One-off startup job
Run a one-off job, commonly powered by the Task module, under supervision. A normal completion leaves it stopped; a crash causes the supervisor to restart it. This preserves subtree management without restarting successful work. section 9.1.6
Choose the worker policy according to termination behavior:
- Use :transient when normal completion is expected but abnormal termination should trigger a restart. section 9.1.6
- Use :temporary when termination should never restart the process, such as a disconnected HTTP request or TCP connection. section 9.1.6
Use the supervision tree diagram to place transient workers within the larger fault-isolation structure. section 9.1.6
