A library that lets you enqueue jobs in Resque from a PHP application

Installs: 3

Dependents: 0

Stars: 3

Watchers: 1

Forks: 2

Language: PHP

v0.1.4 2013-08-30 16:23 UTC


A library that lets you enqueue Resque jobs from a PHP application.


  • php >= 5.3.3 (>= 5.4 in order to be able to run the tests)
  • phpredis


Create a composer.json file with the following content:

    "require": {
        "italiansubs/resque-enqueuer": "0.1.*"

Then run

$ curl -s | php
$ php composer.phar install

You should now have ResqueEnqueuer installed inside your vendor folder: vendor/italiansubs/resque-enqueuer

And an handy autoload file to include in you project: vendor/autoload.php

How to use

require_once __DIR__ . '/vendor/autoload.php';

use ResqueEnqueuer\Enqueuer;

try {
    $enq = new Enqueuer(); // $redisHost, $redisPort, $redisDb, $resqueBaseKeyName
    $enq->enqueue('queue_name', 'job_name', array('id_user' => 100, 'other_param' => 'foo'));
} catch (RedisException $e) {
    echo $e->getMessage() . PHP_EOL;


The library is fully tested with PHPUnit.

Go to the base library folder and install the dev dependencies with composer, and then run the phpunit test suite

$ composer --dev install
$ ./vendor/bin/phpunit --colors test


Many thanks to the great folks that developed and are contributing to the absolutely awesome tool that is Resque!

Also props to my friend and colleague Matteo Giachino that pushed me to open source my first project and from whom I pretty much copied this readme structure.