2017 © Pedro Peláez
 

symfony-bundle resque-queue-driver-bundle

A bundle for running symfony background tasks with Redis backend

image

mcfedr/resque-queue-driver-bundle

A bundle for running symfony background tasks with Redis backend

  • Saturday, February 24, 2018
  • by mcfedr
  • Repository
  • 1 Watchers
  • 0 Stars
  • 156 Installations
  • PHP
  • 0 Dependents
  • 1 Suggesters
  • 3 Forks
  • 0 Open issues
  • 14 Versions
  • 6 % Grown

The README.md

Resque Queue Driver Bundle

A driver for Queue Manager Bundle that uses resque, (*1)

Latest Stable Version License Build Status, (*2)

Usage

PHP Resque installs two commands into your bin folder. Generally you should run just one instance of resque-scheduler and several of resque., (*3)

QUEUE=default APP_INCLUDE=var/bootstrap.php.cache REDIS_BACKEND=127.0.0.1:6379 ./vendor/bin/resque
PREFIX="my_app:" REDIS_BACKEND=127.0.0.1:6379 ./vendor/bin/resque-scheduler
  • Add VVERBOSE=1 to the environment to get more logging.

It can be useful to decouple the queueing (master) and execution (slave) of jobs in a micro service architecture. For this it can be necessary to set specific kernel_options for a worker if they differ from the master., (*4)

  • Add KERNEL_CLASS with the fully qualified class name of the kernel to override the kernel.root_dir option. If your kernel is not located in the root namespace (like in symfony flex applications), this is the only way to specify the class name of the kernel class.
  • Add SYMFONY_ENV or APP_ENV to override the kernel.environment option.
  • Add SYMFONY_DEBUG or APP_DEBUG to override the kernel.debug option.

Install

Composer

composer require mcfedr/resque-queue-driver-bundle

AppKernel

Include the bundle in your AppKernel, (*5)

public function registerBundles()
{
    $bundles = [
        ...
        new Mcfedr\QueueManagerBundle\McfedrQueueManagerBundle(),
        new Mcfedr\ResqueQueueDriverBundle\McfedrResqueQueueDriverBundle(),

Config

With this bundle installed you can setup your queue manager config similar to this:, (*6)

mcfedr_queue_manager:
    managers:
        default:
            driver: resque
            options:
                host: 127.0.0.1
                port: 11300
                default_queue: default
                track_status: false

This will create a QueueManager service named "mcfedr_queue_manager.default", (*7)

  • host and port - Where is your Redis server
  • default_queue - Name of the default queue to use
  • track_status - Set to true to enable extra job tracking data to be stored in redis. Useful for debugging

Options to QueueManager::put

  • queue - A string with the name of a queue
  • time - A \DateTime object of when to schedule this job
  • delay - Number of seconds from now to schedule this job
  • track_status - Set to true to enable extra job tracking data to be stored in redis. Useful for debugging

The Versions

24/02 2018

dev-master

9999999-dev

A bundle for running symfony background tasks with Redis backend

  Sources   Download

MIT

The Requires

 

The Development Requires

by Fred Cox

task redis queue job schedule resque

24/02 2018

3.5.0

3.5.0.0

A bundle for running symfony background tasks with Redis backend

  Sources   Download

MIT

The Requires

 

The Development Requires

by Fred Cox

task redis queue job schedule resque

20/02 2018

3.4.0

3.4.0.0

A bundle for running symfony background tasks with Redis backend

  Sources   Download

MIT

The Requires

 

The Development Requires

by Fred Cox

task redis queue job schedule resque

03/11 2017

3.3.0

3.3.0.0

A bundle for running symfony background tasks with Redis backend

  Sources   Download

MIT

The Requires

 

The Development Requires

by Fred Cox

task redis queue job schedule resque

19/07 2017

3.2.3

3.2.3.0

A bundle for running symfony background tasks with Redis backend

  Sources   Download

MIT

The Requires

 

The Development Requires

by Fred Cox

task redis queue job schedule resque

19/07 2017

3.1.2

3.1.2.0

A bundle for running symfony background tasks with Redis backend

  Sources   Download

MIT

The Requires

 

The Development Requires

by Fred Cox

task redis queue job schedule resque

13/02 2017

3.1.1

3.1.1.0

A bundle for running symfony background tasks with Redis backend

  Sources   Download

MIT

The Requires

 

The Development Requires

by Fred Cox

task redis queue job schedule resque

05/08 2016

3.1.0

3.1.0.0

A bundle for running symfony background tasks with Redis backend

  Sources   Download

MIT

The Requires

 

The Development Requires

by Fred Cox

task redis queue job schedule resque

04/08 2016

3.0.2

3.0.2.0

A bundle for running symfony background tasks with Redis backend

  Sources   Download

MIT

The Requires

 

The Development Requires

by Fred Cox

task redis queue job schedule resque

04/08 2016

3.0.1

3.0.1.0

A bundle for running symfony background tasks with Redis backend

  Sources   Download

MIT

The Requires

 

The Development Requires

by Fred Cox

task redis queue job schedule resque

04/08 2016

3.0.0

3.0.0.0

A bundle for running symfony background tasks with Redis backend

  Sources   Download

MIT

The Requires

 

The Development Requires

by Fred Cox

task redis queue job schedule resque

29/07 2016

2.0.1

2.0.1.0

A bundle for running symfony background tasks with Redis backend

  Sources   Download

MIT

The Requires

 

The Development Requires

by Fred Cox

task redis queue job schedule resque

29/07 2016

2.0.0

2.0.0.0

A bundle for running symfony background tasks with Redis backend

  Sources   Download

MIT

The Requires

 

The Development Requires

by Fred Cox

task redis queue job schedule resque

04/02 2016

1.0.0

1.0.0.0

A bundle for managing job queues

  Sources   Download

MIT

The Requires

 

The Development Requires

by Fred Cox

task redis queue job schedule resque