Skip to content

Commit

Permalink
use job_incomplete instead of direct call api and collecting the logs…
Browse files Browse the repository at this point in the history
… if the backend crashed
  • Loading branch information
nilxam authored and coolo committed Apr 3, 2014
1 parent 131d81c commit 44162ee
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions script/worker
Expand Up @@ -449,7 +449,7 @@ sub main(){
if(unlink("$pooldir/backend.crashed") && $worker) {
print STDERR "backend crashed and need a reschedule...\n";
_kill_worker($worker);
api_call('post', 'jobs/'.$job->{'id'}.'/set_done', {result => 'incomplete'});
job_incomplete($job, 1, "backend crashed");
$aborted = 'crashed';
}
}
Expand Down Expand Up @@ -520,7 +520,7 @@ sub main(){
close($log);
}

if (!$aborted || $aborted eq 'cancel' || $aborted eq 'timeout') {
if (!$aborted || $aborted eq 'cancel' || $aborted eq 'timeout' || $aborted eq 'crashed') {
# collect uploaded logs
my @uploaded_logfiles = <$logupload_dir/$name/*>;
mkdir("$pooldir/testresults/$name/ulogs/");
Expand Down

0 comments on commit 44162ee

Please sign in to comment.