Download the PHP package solophp/job-queue without Composer
On this page you can find all versions of the php package solophp/job-queue. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Informations about the package job-queue
Solo Job Queue
Database-backed job queue for PHP on Doctrine DBAL: leased claims with ownership tokens, a retry policy and deadline stored with every job, and a worker daemon, on MySQL, MariaDB, PostgreSQL and SQLite.
Features
- Leased Claims — each attempt gets a random token and an expiring lease; only the current attempt can complete, fail or renew its job, so a stale worker cannot overwrite the state of the one that replaced it
- Retries per Job — attempts, exponential backoff and deadline are stored with each job when it is enqueued; no worker setting can change them later
- Four Databases — MySQL 8+, MariaDB 10.6+, PostgreSQL and SQLite 3.35+, with
SKIP LOCKEDclaims, deadlock-free MySQL claims at READ COMMITTED, and retried lock conflicts - Maintenance — abandoned attempts are recovered with each job's own policy, overdue jobs expire, and finished history is pruned in batches
- Worker Daemon — one job at a time, graceful shutdown on SIGTERM and SIGINT, job, runtime and memory limits, and timed maintenance
- Observable — PSR-3 logging with the exception under its key, listener events for metrics and tracing, and typed records for inspection
- Upgradable —
Schema::migrate()converts a version 1 table in place, keeping IDs, payloads and history
Installation
Requires PHP 8.3+ with mbstring, Doctrine DBAL 4 and a PDO driver. pcntl is optional and enables graceful shutdown.
Quick Example
Documentation
- Installation
- Quick Start
- Jobs and Codecs
- Enqueueing
- Processing and Leases
- Retries and Deadlines
- Worker
- Maintenance and Monitoring
- Delivery and Errors
- Schema and Databases
- API Reference
Upgrading from 1.x? See CHANGELOG.md.
Development
The default suite uses SQLite, including file-backed two-connection contention when pcntl is available and a stress test in which four worker processes drain one queue and every job must run exactly once. CI also runs it on MySQL, MariaDB and PostgreSQL on PHP 8.3, 8.4 and 8.5.
For a disposable integration database:
Use a dedicated test database: the integration suite drops and recreates its jobs table. The default database name is queue_test; override it with QUEUE_TEST_DB. PostgreSQL uses the driver pdo_pgsql and its assigned port. The Compose services bind only to localhost and keep their data in temporary filesystems.
To preview the documentation site:
License
MIT — see LICENSE.
All versions of job-queue with dependencies
ext-mbstring Version *
doctrine/dbal Version ^4.0
solophp/contracts Version ^1.9
psr/container Version ^1.0|^2.0
psr/log Version ^1.0|^2.0|^3.0
psr/clock Version ^1.0