theviralab/resque-bundle
A Laravel bundle for running background jobs with Resque, the Redis-backed PHP queue library. It wires Resque workers and queues into your app so time-consuming tasks like emails, image processing, and report generation run asynchronously outside the request cycle.
Read this as a Symfony 2 bundle, not a Laravel package. There is no service provider, no facade, no config/ publishing, and no queue driver adapter. composer require theviralab/resque-bundle will succeed inside a Laravel app, but the bundle class will never boot. If your goal is "use this in Laravel," the first step is actually reading its composer.json require section to find the underlying resque client (most likely chrisboulton/php-resque) and depending on that directly instead.
Where to look first, in this order:
DependencyInjection/ — the extension and Configuration.php tell you exactly which options exist (Redis host/port/database, queue names, worker defaults). This is the contract, more reliable than the docs.Command/ — the worker and enqueue commands. These tell you how the package expects processes to be launched.Resources/config/services.yml — the service IDs you'd inject.Job/ or wherever perform() classes live — the shape of a job.Minimal steps in the target environment (Symfony 2):
// app/AppKernel.php
$bundles = [ /* ... */ new TheViralab\ResqueBundle\ResqueBundle() ];
Then add a config block under the bundle alias in config.yml pointing at Redis, and start a worker via app/console.
Your first use case should be one idempotent, low-risk job — a welcome email, a thumbnail resize, a webhook retry. Enqueue it, watch it flow from Redis into a worker, confirm the failed queue stays empty. If you can't complete that loop in an hour, stop: the integration debt already exceeds the value.
Job classes are plain PHP objects with a perform() method, dispatched by fully-qualified class name. The standard php-resque shape:
class SendWelcomeEmail
{
public function perform()
{
$userId = $this->args['user_id'];
// re-hydrate, then act
}
}
The bundle's value-add is wrapping Resque::enqueue() behind a service or console command rather than raw static calls. Keep it that way:
perform(). This is the only way the job classes stay testable.numprocs matching your concurrency needs. Never enqueue inline "just for now" in production — you'll forget.processed_at flag in the DB.enqueue inside perform() for follow-up work rather than doing five things in one job.Bundle classes and Laravel service providers do not interoperate. There's no published config, no facade, no Queue::push() integration. You'd be re-implementing the bundle from scratch around the underlying library.resque:queue:* forever while the worker logs an unresolvable class. Verify by running a worker in the foreground first.perform(). This is not optional and not obvious from the code.--count=N or equivalent) and let the supervisor restart the process. Don't trust PHP's GC in a fork loop.redis-cli keys 'resque:*', then lrange resque:queue:default 0 -1 and lrange resque:failed 0 -1. Unless the bundle happens to wire up resque-web (unlikely), you're reading failures by hand.chrisboulton/php-resque yourself with a thin provider, or — for Laravel teams — use the native Redis queue with Horizon. You get retries, metrics, a dashboard, and an API that gets security patches. This bundle offers none of that.How can I help you explore Laravel packages today?