2017 © Pedro Peláez
 

symfony-bundle resque-bundle

PHP Resque bundle

image

php-resque/resque-bundle

PHP Resque bundle

  • Wednesday, January 13, 2016
  • by zomble
  • Repository
  • 2 Watchers
  • 3 Stars
  • 21 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 1 Open issues
  • 1 Versions
  • 0 % Grown

The README.md

Resque Bundle

Resque for the Symfony Framework., (*1)

Build Status: Build Status, (*2)

This bundle brings you PHP Resque and all of it's features, plus the following:, (*3)

  • Job targets can be services.
  • Commands to easily manage your background queue.
  • ! Ability to defer jobs to kernel.terminate, for when you're not quite ready for managing background workers.
  • ! Optional ability to map job targets to specific queues. So you can avoid littering the application with queue names.

It however, currently adds the complication that your background workers will need to halt/reload for application changes., (*4)

Installation

Step 1: Download the Bundle

Open a command console, enter your project directory and execute the following command to download the latest stable version of this bundle:, (*5)

$ composer require php-resque/resque-bundle "dev-master"

This command requires you to have Composer installed globally, as explained in the installation chapter of the Composer documentation., (*6)

Step 2: Enable the Bundle

Then, enable the bundle by adding it to the list of registered bundles in the app/AppKernel.php file of your project:, (*7)

<?php
// app/AppKernel.php

// ...
class AppKernel extends Kernel
{
    public function registerBundles()
    {
        $bundles = array(
            // ...

            new Resque\Bundle\ResqueBundle\ResqueBundle(),
        );

        // ...
    }

    // ...
}

Step 3: Configure the Bundle

resque:
  adapter: array|predis_resque
  array:
    process_on_terminate: true
  predis_resque:
    host: 127.0.0.1

Usage

You can use the PHP Resque bundle in two ways. Console commands and in code through the resque service., (*8)

Commands

! If you've configured the bundle to use a persisting adapter, the following commands will also act as a working example., (*9)

Job enqueue, (*10)

$ app/console resque:enqueue acme 'Resque\Bundle\ResqueBundle\ExampleJob'
$ app/console resque:enqueue high-priority resque.job.example ?name=Fabian

Queue list, (*11)

$ app/console resque:queue:list

Queue delete, (*12)

$ app/console resque:queue:delete acme

Worker start, (*13)

$ app/console resque:worker:start high-priority,acme

Worker list, (*14)

$ app/console resque:queue:list

Worker stop, (*15)

$ app/console resque:queue:stop --all

All commands make extensive usage of --help, if you want further information., (*16)

PHP

!, (*17)

<?php

$resque = $container->get('resque');

// @todo 

The Versions

13/01 2016

dev-master

9999999-dev

PHP Resque bundle

  Sources   Download

MIT

The Requires

 

The Development Requires

by Paul Croker

redis bundle job worker background resque