flowpack / jobqueue-doctrine
Implements concrete Queue for the doctrine work queue. Requires the packages flowpack/jobqueue-common to be installed.
Installs: 163 586
Dependents: 4
Suggesters: 1
Security: 0
Stars: 6
Watchers: 4
Forks: 9
Open Issues: 0
Type:neos-package
Requires
- ext-json: *
- flowpack/jobqueue-common: ^3.0 || dev-master
- neos/flow: ^5.0 || ^6.0 || ^7.0 || ^8.0 || ^9.0
README
A job queue backend for the Flowpack.JobQueue.Common package based on Doctrine.
Usage
Install the package using Composer:
composer require flowpack/jobqueue-doctrine
If not already installed, that will fetch its requirements, namely the
jobqueue-common
package.
Now the queue can be configured like this:
Flowpack: JobQueue: Common: queues: 'some-queue': className: 'Flowpack\JobQueue\Doctrine\Queue\DoctrineQueue' executeIsolated: true options: defaultTimeout: 50 releaseOptions: priority: 512 delay: 120
The required tables can be created executing:
./flow queue:setup some-queue
Boost Mode
The poll interval should be short enough to process messages in time, and long enough to minimize resource consumption for the database. Boost mode is a solution which automatically handles spikes by processing messages in quick succession. When no new messages appear for a specified time, boost mode is disabled again.
The frequency by which the queue loop will look for new messages is the
configured pollInterval
. In boost mode, the option boostPollInterval
is
used instead. boostTime
defines the time since the last processed message
after which boost mode is deactivated again.
Specific options
The DoctrineQueue
supports following options:
NOTE: The DoctrineQueue
should work with any database supported by
Doctrine DBAL. It has been tested on MySQL, PostgreSQL, SQL Server and
SQLite. You can specify the backend via the backendOptions
. If you
omit this setting, the current connection will be re-used (i.e. the
currently active Flow database).
Submit options
Additional options supported by JobManager::queue()
, DoctrineQueue::submit()
and the Job\Defer
annotation:
Release options
Additional options to be specified via releaseOptions
for the queue:
License
This package is licensed under the MIT license
Contributions
Pull-Requests are more than welcome. Make sure to read the Code Of Conduct.