GitXplorerGitXplorer
m

resque-bundle

public
9 stars
2 forks
0 issues

Commits

List of commits on branch master.
Unverified
95a79119fbd36bf2398e5f690fd46c8b711e7e3c

Php cs fixer

mmcfedr committed 8 years ago
Unverified
3eb394195bc0bbf2f6942228ffdd502aabfef64f

Merge pull request #3 from mcfedr/allow_string_port

mmcfedr committed 8 years ago
Unverified
4803a39ab1a08ce5edc742f1ab77a9caf850828f

Allow strings to be passed for port

mmcfedr committed 8 years ago
Unverified
16d252c6f71ff8e217e8ebf4c0802dff4558c2ee

deps up

mmcfedr committed 8 years ago
Unverified
a0a9945f7ce4e5387f9473bcbd98b0076bfd0ca0

Merge pull request #2 from ggioffreda/master

mmcfedr committed 9 years ago
Unverified
5f22f5a41ef54b671a213c10fea1bec76ae31eec

Fix typo in README docs.

gggioffreda 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