GitXplorerGitXplorer
m

resque-bundle

public
9 stars
2 forks
0 issues

Commits

List of commits on branch master.
Unverified
80bd637037107c5179617428bca6dad4d2fc481d

enable install with Symfony 3

mmcfedr committed 9 years ago
Unverified
5b6e80e327082534eef6b14c0b957dcea9b2ba20

Add suggests

mmcfedr committed 9 years ago
Unverified
80d7a0e07a79939ded7ca543f68de98e2d769388

upgrade travis

mmcfedr committed 9 years ago
Unverified
1cd305f3ad42d5b76b442eeb51f9d5b9898e337c

Remove 5.4 support and add redis to travis

mmcfedr committed 9 years ago
Unverified
ec03fadaa1f9848cc1b6559194289c44c619c5d5

Test on php 7

mmcfedr committed 9 years ago
Unverified
11f71ad32dee015b8fa970f8571faf0c96eea52b

Create JobDescription for all jobs, with the id for current jobs

mmcfedr committed 9 years ago

README

The README file for this repository.

Resque Bundle

A bundle for managing jobs with php-resque

Latest Stable Version License Build Status SensioLabsInsight

Requirements

You will need a Redis server

You can try something like

apt-get install redis-server

Or

brew install redis

Install

Composer

php composer.phar require mcfedr/resque-bundle

AppKernel

Include the bundle in your AppKernel

public function registerBundles()
{
    $bundles = array(
        ...
        new Mcfedr\ResqueBundle\McfedrResqueBundle(),

Configuration

Your configuration should be something like this

mcfedr_resque:
    host: 127.0.0.1
    port: 6379
    default_queue: default
    prefix: 'my_app:'

Options

  • host - The redis host name
  • port - The redis port
  • prefix - The prefix for resque keys in redis - Use this when multiple resque instances are running in a single redis host to separate them completely
  • default_queue - Name of queue to use if not specified
  • debug - If set to true no calls to Resque will actually be made
  • track_status - Set to true to enable job tracking for all jobs

Usage

  1. Your background tasks are services that implement Mcfedr\ResqueBundle\Worker\WorkerInterface

  2. Use mcfedr_resque.manager to put tasks into the queue

  3. Run the resque worker

    VVERBOSE=1 QUEUE=default APP_INCLUDE=app/bootstrap.php.cache PREFIX="my_app:" REDIS_BACKEND=127.0.0.1:6379 ./bin/resque

  4. And optionally the scheduler

    VVERBOSE=1 PREFIX="my_app:" REDIS_BACKEND=127.0.0.1:6379 ./bin/resque-scheduler

Tests

./vendor/bin/phpunit