NAME

Job::Machine

VERSION

version 0.14

SYNOPSIS

The Client:

my $client = Job::Machine::Client->new(jobclass => 'job.task');
my $id = $client->send({foo => 'bar'});

The Worker is a subclass

use base 'Job::Machine::Worker';

sub process {
    my ($self, $data) = @_;
    $self->reply({baz => 'Yeah!'}) if $data->{foo} eq 'bar';
};

and then use the worker

my $worker = Worker->new(jobclass => 'job.task');
$worker->receive;

Back at the Client:

if ($client->check('reply')) {
    print $client->receive->{baz};
}

DESCRIPTION

A small, but versatile and efficient system for sending jobs to a message queue and communicating answers back to the sender.

Job::Machine uses LISTEN / NOTIFY from PostgreSQL to send signals between workers and clients

NAME

Job::Machine - Job queue handling

SUPPORT

Report tickets to http://rt.cpan.org/Job-Machine/

AUTHOR

Kaare Rasmussen <kaare@cpan.org>.

COPYRIGHT

Copyright (C) 2009, Kaare Rasmussen

This module is free software; you can redistribute it or modify it under the same terms as Perl itself.

AUTHOR

Kaare Rasmussen <kaare at cpan dot net>

COPYRIGHT AND LICENSE

This software is copyright (c) 2010 by Kaare Rasmussen.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.