| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [View Raw Code] [Original HTTPS Page] |
To make changes to the config file, we have to have our copy in the app/Config/Queue.php. Luckily, this package comes with handy command that will make this easy.
When we run:
php spark queue:publish
We will get our copy ready for modifications.
Available options:
The default handler used by the library. Default value: database.
An array of available handlers. Available handlers: database, redis, predis, and rabbitmq.
The configuration settings for database handler.
!!! note
The [Strict Mode](https://codeigniter.com/user_guide/database/transactions.html#strict-mode) for the given `dbGroup` is automatically disabled - due to the nature of the queue worker. When using **SQLite3** with multiple worker processes, configure `busyTimeout` in the selected connection group. This lets a worker wait briefly when another process holds SQLite's write lock instead of failing immediately with `SQLITE_BUSY`.
The configuration settings for redis handler. You need to have a ext-redis installed to use it.
The configuration settings for predis handler. You need to have Predis installed to use it.
The configuration settings for rabbitmq handler. You need to have php-amqplib installed to use it.
If the job failed, should we move it to the failed jobs table? Default value: true.
This is very useful when you want to be able to see which tasks are failing and why.
The default priority for the queue if non default queuePriorities are set. Not set by default.
This is needed only if you have defined non default priorities for the queue and the default priority should be different from the default value.
Example:
public array $queueDefaultPriority = [
'emails' => 'low',
];This means that all the jobs added to the emails queue will have the default priority set to low.
The valid priorities for the queue in the order they will be consumed first. Not set by default.
By default, the priority is set to ['default']. If you want to have multiple priorities in the queue, you can define them here.
Example:
public array $queuePriorities = [
'emails' => ['high', 'low'],
];This means that the jobs added to the emails queue can have either high or low priority.
An array of available jobs as key-value. Every job that you want to use with the queue has to be defined here.
The key of the array is used to recognize the job, when we push it to the queue.
Example:
public array $jobHandlers = [
'email' => Email::class,
];| Back | FazBrowse Home | New Git URL |