Snakepit.Pool.WorkerSupervisor (snakepit v0.1.2)
DynamicSupervisor for pool worker processes.
This supervisor manages the lifecycle of workers:
- Starts workers on demand
- Handles crashes with automatic restarts
- Provides clean shutdown of workers
Summary
Functions
Returns a specification to start this module under a supervisor.
Lists all supervised workers.
Restarts a worker by ID.
Starts the worker supervisor.
Starts a new pool worker with the given ID.
Stops a worker gracefully.
Returns the count of active workers.
Functions
Returns a specification to start this module under a supervisor.
See Supervisor
.
Lists all supervised workers.
Restarts a worker by ID.
Starts the worker supervisor.
Starts a new pool worker with the given ID.
Examples
iex> Snakepit.Pool.WorkerSupervisor.start_worker("worker_123")
{:ok, #PID<0.123.0>}
Stops a worker gracefully.
Returns the count of active workers.