Skip to content

Commit

Permalink
Pass status all the way back up
Browse files Browse the repository at this point in the history
  • Loading branch information
bobtfish committed Dec 3, 2010
1 parent 504c5bd commit b5d856f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 9 deletions.
8 changes: 1 addition & 7 deletions lib/CatalystX/JobServer/JobRunner.pm
Original file line number Diff line number Diff line change
Expand Up @@ -46,17 +46,11 @@ method consume_message ($message) {
}

method job_finished ($job, $output){
my $finished = Finished->new(job => $job);
my $finished = Finished->new(job => $job, ok => $output->ok);
$finished->finalize();
$self->_remove_running($finished);
}

method job_failed ($job, $error) {
my $finished = Finished->new(job => $job, ok => 0);
$finished->finalize;
$self->_remove_running($finished);
}

method run_job ($job) {
# warn("do_run_job " . Dumper ($running_job));
$self->_do_run_job($job);
Expand Down
4 changes: 2 additions & 2 deletions lib/CatalystX/JobServer/JobRunner/Forked/WorkerState.pm
Original file line number Diff line number Diff line change
Expand Up @@ -75,11 +75,11 @@ has update_status_cb => (
predicate => '_has_update_status_cb',
);

method job_finished ($output) {
method job_finished ($end_status) {
my $working_on = $self->working_on;
$self->_clear_working_on;
try {
$self->job_finished_cb->(encode_json($working_on), $output)
$self->job_finished_cb->(encode_json($working_on), $end_status)
if $self->_has_job_finished_cb;
}
catch {
Expand Down

0 comments on commit b5d856f

Please sign in to comment.