A temporary worker is a supervised process that is not restarted after termination. Configure it with restart: :temporary in child_spec/1 when restarting would serve no purpose. section 9.1.6
Use a temporary worker when:
- A process handles an HTTP request or TCP connection and termination already closes the socket and disconnects the remote party. section 9.1.6
- The process should remain in the supervision tree so the supervisor can terminate the subtree without leaving dangling processes. section 9.1.6
Connection handler
Define the connection-handling child with restart: :temporary. A failed handler is not replaced, while supervision still provides organized lifecycle control. section 9.1.6
Locate the worker within the surrounding supervision tree and its lifecycle relationships. section 9.1.6
