Skip to content

ShonM/ResqueBundle

Repository files navigation

ResqueBundle Build Status

Create a Job

// src/Acme/ResqueBundle/Job/TestJob.php
namespace Acme\ResqueBundle\Job;

class HelloWorldJob
{
    public function perform ()
    {
        fwrite(STDOUT, "Hello " . $this->args['hello'] . "!\n");
    }
}

Post your Job

$container->get('resque')->add('Acme\ResqueBundle\Job\HelloWorldJob', 'queuename', array('hello' => 'world'));

Hire a Worker

app/console resque:worker:start queuename

Party!


Best Practices

  1. Jobs should be small and simple
  2. Workers should be idempotent and transactional
  3. Design for concurrency - use connection pooling

Development & Testing

$ composer install --dev
$ bin/phpunit

About

This repo is not maintained

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •  

Languages