• Stars
    star
    42
  • Rank 636,451 (Top 13 %)
  • Language
    Perl
  • Created over 12 years ago
  • Updated almost 3 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

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.

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

More Repositories

1

slugit-jquery

Just another jquery slugify plugin
JavaScript
49
star
2

Gardel

Gardel is a very simple perl web framework that also has a hat. ( Inspired on sinatra.rb )
Perl
10
star
3

PhotoBooth

A js+flash photo booth app
JavaScript
9
star
4

Twitirc

IRC/twitter bot that can speak both ways
Perl
5
star
5

Postfix-Admin

A drop in replacement for Postfix Admin (php) build on Catalyst.
Perl
4
star
6

log-smoker

journalctl web viewer and realtime websocket based API
Perl
2
star
7

WWW--Twitpic

A perl interface to Twitpic.com public API.
Perl
2
star
8

dbic.curs.barcelona.pm

Perl
2
star
9

curs.barcelona.pm

JavaScript
2
star
10

Mojolicious-Plugin-DBIC

Mojolicious plugin for DBIx::Class schemas
Perl
2
star
11

app.curs.barcelona.pm

Example catalyst app for curs.perl.cat
Perl
2
star
12

Business-Invoice

Perl module for invoicing
Perl
2
star
13

DBIx-Class-I18NColumns

DBIC component for internationalizable pseudo-column accessors
Perl
1
star
14

net-driller

Drill tunnels all over your cheap boxes
Ruby
1
star
15

Catamusing-Talk

Charla sobre Catalyst y Moose para madrid.pm
Perl
1
star
16

coding-examples-cto

Coding examples for CTO talk
Perl
1
star
17

Catalyst-Runtime

Perl
1
star
18

Catalyst-TraitFor-Controller-ParamsExpander

Perl
1
star
19

Catalyst-TraitFor-Controller-LocaleSelect

Role to add locale selection capabilities to your controllers.
Perl
1
star
20

resque-web

An improved version off ruby's sinatra resque-web on top of resque-perl, mojolicious and vue. (WIP)
Vue
1
star
21

Mars

A red planet
Perl
1
star
22

a-bag-of-mojo-sweets

Talk about the Mojo namespace given at Barcelona, Perl and Friends 2017
JavaScript
1
star
23

TwitMeet

Just some twitter tests right now
Perl
1
star
24

Catalyst-TraitFor-Controller-reCAPTCHA

Authenticate people and read books!
Perl
1
star
25

mojolicious-talk

JavaScript
1
star
26

Catalyst-Plugin-Captcha

Release history of Catalyst-Plugin-Captcha
Perl
1
star