Skip to main content
BACKEND-DEVELOPMENT5 MIN READ

Shut Down Workers Without Losing Work

Sequence worker shutdown so in-flight jobs either finish safely or become retryable.

Deploy pressure Your queue worker receives SIGTERM during a rolling deploy. One billing job is mid-flight and the queue visibility timeout is 45 seconds. The next choices decide whether the job is completed, retried, or lost. Disposability Stop intake, settle current work, leave durable truth. Graceful shutdown protects correctness by making termination an explicit state transition. Exit now Fast deploy, unknown job state. Work survives deploy boundaries. A worker is disposable only when stopping it preserves the durable business workflow. 01 Intake 02 In-flight 03 Try fresh First signal SIGTERM arrives while the worker is polling every two seconds.

Read the full lesson

Sign up free — one personalized lesson every day, matched to your role and goals.

Already have an account? Sign in

← Back to library
Contact us