codeigniter4 / queue
Queues for CodeIgniter 4 framework
Installs: 28 741
Dependents: 0
Suggesters: 0
Security: 0
Stars: 45
Watchers: 9
Forks: 12
Open Issues: 1
Requires
- php: ^8.1
Requires (Dev)
- codeigniter4/devkit: ^1.0
- codeigniter4/framework: ^4.3
- phpstan/phpstan-strict-rules: ^1.5
- predis/predis: ^2.0
Suggests
- ext-redis: If you want to use RedisHandler
- predis/predis: If you want to use PredisHandler
This package is auto-updated.
Last update: 2024-09-19 09:50:51 UTC
README
Queues for the CodeIgniter 4 framework.
Installation
composer require codeigniter4/queue
Migrate your database:
php spark migrate --all
Configuration
Publish configuration file:
php spark queue:publish
Create your first Job:
php spark queue:job Example
Add it to the $jobHandlers
array in the app\Config\Queue.php
file:
// ... use App\Jobs\Example; // ... public array $jobHandlers = [ 'my-example' => Example::class ]; // ...
Basic usage
Add job to the queue:
service('queue')->push('queueName', 'my-example', ['data' => 'array']);
Run the queue worker:
php spark queue:work queueName
Docs
Read the full documentation: https://queue.codeigniter.com
Contributing
We accept and encourage contributions from the community in any shape. It doesn't matter whether you can code, write documentation, or help find bugs, all contributions are welcome. See the CONTRIBUTING.md file for details.