Job::Machine::Base - Base class both for Client and Worker Classes
my $client = Job::Machine::Base->new( dbh => $dbh, queue => 'queue', ); my $client = Job::Machine::Base->new( dsn => $dsn, user => $user, password => $password, db_attr => $db_attributes ... );
my $worker = Job::Machine::Base->new( queue => [qw/q1 q2/], ... );
Either provide an already warm database handle, or give a new array to tell how to open a database.
Client: queue is the channel to the worker. Worker: queue is what the worker is listening to. Can be a scalar or arrayref. timeout is how long to wait for notifications before doing a housekeeping loop. Default is 5 minutes.
Give it a text and it will log it.
Returns the database handle.
Kaare Rasmussen <email@example.com>.
Copyright (C) 2010, Kaare Rasmussen
This module is free software; you can redistribute it or modify it under the same terms as Perl itself.
Kaare Rasmussen <kaare at cpan dot net>
This software is copyright (c) 2011 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.