Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Perl port of the original Ruby library. It's intended to work using the same backend to share tasks and be able to manage the system using ruby's resque-server webapp. Resque is a Redis-backed library for creating background jobs, placing them on multiple queues, and processing them later.

branch: master

Fetching latest commit…

Octocat-spinner-32-eaf2f5

Cannot retrieve the latest commit at this time

Octocat-spinner-32 lib
Octocat-spinner-32 t
Octocat-spinner-32 .gitignore
Octocat-spinner-32 .travis.yml
Octocat-spinner-32 Changes
Octocat-spinner-32 README.pod
Octocat-spinner-32 dist.ini
Octocat-spinner-32 weaver.ini
README.pod

Resque for perl

Redis-backed library for creating background jobs, placing them on multiple queues, and processing them later.

SYNOPSIS

First you create a Resque instance where you configure the Redis backend and then you can start sending jobs to be done by workers:

    use Resque;

    my $r = Resque->new( redis => '127.0.0.1:6379' );

    $r->push( my_queue => { 
        class => 'My::Task', 
        args => [ 'Hello world!' ]
    });

Background jobs can be any perl module that implement a perform() function. The Resque::Job object is passed as the only argument to this function:

    package My::Task;
    use strict;
    use 5.10.0;

    sub perform {
        my $job = shift;
        say $job->args->[0];
    }

    1;

Finally, you run your jobs by instancing a Resque::Worker and telling it to listen to one or more queues:

    use Resque;

    my $w = Resque->new( redis => '127.0.0.1:6379' )->worker;
    $w->add_queue('my_queue');
    $w->work;

DESCRIPTION

Resque is a Redis-backed library for creating background jobs, placing them on multiple queues, and processing them later.

This library is a perl port of the original Ruby one: https://github.com/defunkt/resque

My main goal doing this port is to use the same backend to be able to manage the system using ruby's resque-server webapp.

As extracted from the original docs, the main features of Resque are:

Resque workers can be distributed between multiple machines, support priorities, are resilient to memory leaks, tell you what they're doing, and expect failure.

Resque queues are persistent; support constant time, atomic push and pop (thanks to Redis); provide visibility into their contents; and store jobs as simple JSON hashes.

The Resque frontend tells you what workers are doing, what workers are not doing, what queues you're using, what's in those queues, provides general usage stats, and helps you track failures.

A lot more about Resque can be read on the original blog post: http://github.com/blog/542-introducing-resque

Something went wrong with that request. Please try again.