A driver for Queue Manager Bundle that uses Doctrine to store delayed jobs
This driver doesn't run jobs, it requires another driver to actually process jobs.
It currently only works with MySQL as a native query is required to find jobs in a concurrency safe way.
You should run the daemon for delay in addition to any other daemons you are using. This runner simply moves jobs from Doctrine into your other job queues. Because its not doing much work generally a single instance can cope with a high number of jobs.
./bin/console mcfedr:queue:{name}-runnerWhere {name} is what you used in the config. Add -v or more to get detailed logs.
composer require mcfedr/doctrine-delay-queue-driver-bundle
Include the bundle in your AppKernel
public function registerBundles()
{
$bundles = [
...
new Mcfedr\QueueManagerBundle\McfedrQueueManagerBundle(),
new Mcfedr\DoctrineDelayQueueDriverBundle\McfedrDoctrineDelayQueueDriverBundle(),
With this bundle installed you can setup your queue manager config similar to this:
mcfedr_queue_manager:
managers:
delay:
driver: doctrine_delay
options:
entity_manager: default
default_manager: default
default_manager_options: []
This will create a QueueManager service named "mcfedr_queue_manager.delay"
entity_manager- Doctrine entity manager to usedefault_manager- Default job processordefault_manager_options- Default options to pass to job processorput
time- A\DateTimeobject of when to schedule this jobdelay- Number of seconds from now to schedule this jobmanager- Use a different job processor for this jobmanager_options- Options to pass to the processorsputmethod
After you have installed you will need to do a schema update so that the table of delayed tasks is created

