During most deployments, a window exists where code on disk has changed but workers remain on the old version. Workers reserving jobs in this window deserialize payloads from old code and execute them with new code, occasionally causing failures when job classes are renamed or constructor signatures change.

Laravel 13.25 addresses this with a global pause switch that stops all workers on all connections from reserving new jobs without affecting HTTP traffic. The traditional workarounds—maintenance mode (which halts more than queues) and queue:restart (a request, not a guarantee)—are now complemented by this dedicated solution.

The command syntax is straightforward: php artisan queue:pause --all and php artisan queue:resume --all. The queue argument becomes optional; without --all, commands work as before with a connection:queue pair. The same functionality is available via the Queue facade for PHP-based deploy scripts or admin controllers using Queue::pauseAll() and Queue::resumeAll().

Pausing stops workers from reserving new jobs but keeps worker processes alive and looping; they simply sleep instead of popping work. Jobs already processing when pause is invoked run to completion, so no in-flight work is interrupted. Producers remain unaffected: SomeJob::dispatch() continues writing to Redis or the database, and those jobs remain queued until resumption.

Implementation uses a single cache key, illuminate:queues:paused, set with forever(). Workers already check cache once per loop for restart and per-queue pause signals, and the global key is fetched in the same many() call, adding no extra round trips. QueueManager::isPaused() and getPausedQueues() report a queue as paused when either the global key or its individual key is set.

The global and individual pause mechanisms are independent. If a queue was paused individually before deployment, resumeAll() leaves it paused—a deliberate design choice. Somebody may have parked the queue on purpose to investigate a bad job, and an automated deploy should not silently undo manual actions. Clearing individual pauses still requires queue:resume connection:queue.

Two new events accompany the existing per-queue QueuePaused and QueueResumed: QueuesPaused and QueuesResumed fire when global pause or resume occurs, allowing applications to log or monitor these deployment actions.

The feature was contributed by Jack Bayliss in pull request #61126.