Skip to content

Instantly share code, notes, and snippets.

@stash
Created July 13, 2009 17:44
Show Gist options
  • Save stash/146326 to your computer and use it in GitHub Desktop.
Save stash/146326 to your computer and use it in GitHub Desktop.
package MyBaseWorker;
extends 'TheSchwartz::Moosified::Worker'
sub work {
my $class = shift;
my $job = shift;
my $subtasks = $job->{subtasks};
for my $subtask (@$subtasks) {
my $task = Subtask::Factory->Create($subtask);
$task->do_work($job);
}
$job->completed;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment