mcfedr/queue-driver-pheanstalk-bundle

A bundle for managing job queues

3.1.0 2016-08-05 13:50 UTC

README

A driver for Queue Manager Bundle that uses beanstalkd

Latest Stable Version License

Install

Composer

php composer.phar require mcfedr/beanstalk-queue-driver-bundle

AppKernel

Include the bundle in your AppKernel

public function registerBundles()
{
    $bundles = array(
        ...
        new Mcfedr\BeanstalkQueueDriverBundle\McfedrBeanstalkQueueDriverBundle(),

Config

With this bundle installed you can setup your queue manager config similar to this:

mcfedr_queue_manager:
    managers:
        default:
            driver: beanstalkd
            options:
                host: 127.0.0.1
                port: 11300
                default_queue: mcfedr_queue

Options to QueueManager::put

  • queue - The name of the queue to put the job in
  • priority - The job priority
  • ttr - Beanstalk Time to run, the time given for a job to finish before it is repeated
  • time - A \DateTime object of when to schedule this job
  • delay - Number of seconds from now to schedule this job