Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/diegok/resque-perl
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.
https://github.com/diegok/resque-perl
Last synced: about 1 month ago
JSON representation
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.
- Host: GitHub
- URL: https://github.com/diegok/resque-perl
- Owner: diegok
- Created: 2011-12-26T19:22:43.000Z (almost 13 years ago)
- Default Branch: master
- Last Pushed: 2021-06-18T17:21:29.000Z (over 3 years ago)
- Last Synced: 2024-06-18T15:30:38.796Z (6 months ago)
- Language: Perl
- Homepage:
- Size: 204 KB
- Stars: 42
- Watchers: 8
- Forks: 11
- Open Issues: 0
-
Metadata Files:
- Readme: README.pod
- Changelog: Changes
Awesome Lists containing this project
README
=pod
=head1 Resque for perl
Redis-backed library for creating background jobs, placing them on multiple queues, and processing them later.
=head1 SYNOPSIS
First you create a Resque instance where you configure the L 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 L 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;=head1 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: L
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: L
=cut