Download the PHP package webfiori/queue without Composer
On this page you can find all versions of the php package webfiori/queue. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Table of contents
Download webfiori/queue
More information about webfiori/queue
Files in webfiori/queue
Download webfiori/queue
More information about webfiori/queue
Files in webfiori/queue
Vendor webfiori
Package queue
Short Description A lightweight job queue library for PHP with file-based storage.
License MIT
Package queue
Short Description A lightweight job queue library for PHP with file-based storage.
License MIT
Please rate this library. Is it a good library?
Informations about the package queue
WebFiori Queue
A lightweight job queue library for PHP with file-based storage, priority ordering, and retry logic.
Supported PHP Versions
This library requires PHP 8.1 or higher.
| Build Status |
|---|
Features
- Job interface — define units of work with retry configuration
- FileQueueStorage — file-based backend, zero infrastructure needed
- Priority ordering — higher priority jobs processed first
- Delayed dispatch — schedule jobs to run after a delay
- Automatic retry — failed jobs re-queued with configurable backoff
- Failed job tracking — inspect and retry failed jobs
- Static facade (
QueueFacade) for quick usage without DI - Zero dependencies — requires only PHP 8.1+
Installation
Usage
Define a Job
Dispatch and Process
Static Facade
Failed Jobs
API
Job (interface)
| Method | Description |
|---|---|
handle(): void |
Execute the job logic |
getMaxAttempts(): int |
Maximum retry attempts |
getRetryDelaySeconds(): int |
Base delay between retries (multiplied by attempt number) |
Queue
| Method | Description |
|---|---|
__construct(QueueStorage $storage) |
Create queue with storage backend |
dispatch(Job $job, int $priority = 0, int $delaySeconds = 0): string |
Add job to queue, returns job ID |
process(int $limit = 10): int |
Process pending jobs, returns count processed |
retry(string $id): void |
Retry a failed job |
getPendingCount(): int |
Number of pending jobs |
getFailed(): array |
All failed jobs |
flush(): void |
Remove all failed jobs |
getStorage(): QueueStorage |
Get the storage backend |
QueueStorage (interface)
| Method | Description |
|---|---|
push(string $id, string $payload, int $priority, int $availableAt): void |
Store a job |
pop(int $limit): array |
Retrieve available jobs |
markComplete(string $id): void |
Remove completed job |
markFailed(string $id, string $reason, int $attempts): void |
Move to failed |
setAttempts(string $id, int $attempts): void |
Update attempt count |
retry(string $id): void |
Move failed job back to pending |
getPendingCount(): int |
Count pending jobs |
getFailed(): array |
Get all failed jobs |
flush(): void |
Clear failed jobs |
QueueFacade
Static wrapper. Same methods as Queue plus getInstance(), setInstance(), reset().
License
MIT
All versions of queue with dependencies
PHP Build Version
Package Version
Requires
php Version
>=8.1
The package webfiori/queue contains the following files
Loading the files please wait ...