Created
July 13, 2009 17:44
-
-
Save stash/146326 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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