McFeely::Job - Perl extension to ease McFeely job queueing.
use McFeely::Job;
$job = McFeely::Job->new;
$job->add_tasks($task1, $task2, $task3, $task4);
$job->add_dependencies(
$task2->requires($task1);
$task4->requires($task2);
);
$job->enqueue or die $job->errstr, "\n";
The Perl extension encapsulates a McFeely job to make queueing easy.
Creates a McFeely::Job. Member tasks may be added now. This is equivalent to adding them with the
separate add_tasks method.
Sets the failure notification address.
Sets the success notification address.
Sets the description.
Adds the listed McFeely::Tasks to the job. If the provided task references are not in the McFeely::Task class or a sub class thereof, die. If you don't want to die in add_tasks,
run add_tasks in an eval.
Returns a list of all McFeely::Tasks contained in the job.
A REQUIREMENT is produced by the requires method of a McFeely::Task
or McFeely::Metatask. E.g.
$job->add_dependencies($task1->requires($task2));
This tells McFeely that $task2 must be completed before
$task1 may be attempted.
McFeely::Task, McFeely::Metatask
Matt Liggett <mml@pobox.com>, Chris Dent <cdent@kiva.net>, Adrian Hosey <ahosey@kiva.net>