Download the PHP package digiloopinc/laravel-pausable-batch without Composer
On this page you can find all versions of the php package digiloopinc/laravel-pausable-batch. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download digiloopinc/laravel-pausable-batch
More information about digiloopinc/laravel-pausable-batch
Files in digiloopinc/laravel-pausable-batch
Package laravel-pausable-batch
Short Description A Laravel package that adds pause and resume controls to queued batch jobs.
License MIT
Homepage https://github.com/digiloopinc/laravel-pausable-batch
Informations about the package laravel-pausable-batch
Laravel Pausable Batch
Pause and resume Laravel job batches running on Redis queues.
[!WARNING] This package is currently under active development and is not yet considered production-stable.
When a batch is paused, workers using the redis queue driver will not execute jobs that belong to that batch. Paused jobs are parked in Redis and restored when the batch resumes.
Installation
Queue Connection Setup
Use your standard redis queue connection:
Then run workers against that connection:
Horizon uses the same redis connection and is automatically supported.
Batch API
Batches returned from the repository are wrapped as PausableBatch and expose:
pause(): voidpaused(): boolresume(): void
Configuration
Configure pausable behavior directly on each queue connection under options.pausable:
redis_prefix: Redis key prefix for pause metadata.restore_chunk_size: Number of paused jobs restored per chunk on resume.
Pause metadata uses the same Redis connection as the queue connection's connection setting.
Behavior Notes
- Only
Batchablejobs are considered pausable. - Pause is enforced at worker pop time.
- Paused jobs are moved off the active queue into per-batch paused lists.
- Resume restores paused jobs to the tail of their original queue.
- Pause metadata and parked jobs are cleaned on resume, cancellation, and finish.
Testing
All versions of laravel-pausable-batch with dependencies
illuminate/bus Version ^11.0|^12.0
illuminate/queue Version ^11.0|^12.0
illuminate/redis Version ^11.0|^12.0
illuminate/support Version ^11.0|^12.0