mcfedr/beanstalk-queue-driver-bundle

This package is abandoned and no longer maintained. The author suggests using the mcfedr/queue-manager-bundle package instead.

A bundle for managing job queues

3.2.0 2017-11-03 13:46 UTC

This package is auto-updated.

Last update: 2022-02-01 13:00:15 UTC


README

A driver for Queue Manager Bundle that uses beanstalkd

Latest Stable Version License Build Status

Usage

The beanstalk runner is a Symfony command. You can runner multiple instances if you need to handle higher numbers of jobs.

./bin/console mcfedr:queue:{name}-runner

Where {name} is what you used in the config. Add -v or more to get detailed logs.

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