Exq.WorkerDrainer.Server (exq v0.15.0) View Source

The WorkerDrainer server is responsible for gracefully draining workers when the application is shutting down.

When shutdown starts it instructs the Manager to stop accepting new jobs and then waits for all currently in progress jobs to complete.

If the jobs do not complete within an allowed timeout the WorkerDrainer will shut down, allowing the rest of the supervision tree (including the remaining workers) to then shut down.

The length of the grace period can be configured with the shutdown_timeout option, which defaults to 5000 ms.

Link to this section Summary

Functions

Returns a specification to start this module under a supervisor.

Callback implementation for GenServer.init/1.

Link to this section Functions

Returns a specification to start this module under a supervisor.

See Supervisor.

Callback implementation for GenServer.init/1.