| Current Path : /home/users/unlimited/www/admin.ondemand.codeskitter.site/vendor/codeigniter4/queue/ |
| Current File : /home/users/unlimited/www/admin.ondemand.codeskitter.site/vendor/codeigniter4/queue/README.md |
# CodeIgniter Queue
Queues for the CodeIgniter 4 framework.
[](https://github.com/codeigniter4/queue/actions/workflows/phpunit.yml)
[](https://github.com/codeigniter4/queue/actions/workflows/phpstan.yml)
[](https://github.com/codeigniter4/queue/actions/workflows/deptrac.yml)
[](https://coveralls.io/github/codeigniter4/queue?branch=develop)



## 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:
```php
// ...
use App\Jobs\Example;
// ...
public array $jobHandlers = [
'my-example' => Example::class
];
// ...
```
## Basic usage
Add job to the queue:
```php
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](CONTRIBUTING.md) file for details.