projects
/
arvados.git
/ commitdiff
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
cf4dd2b
)
fix up quoting
author
Tom Clegg <tom@clinicalfuture.com>
Wed, 5 Jun 2013 18:15:30 +0000
(14:15 -0400)
committer
Tom Clegg <tom@clinicalfuture.com>
Wed, 5 Jun 2013 18:15:30 +0000
(14:15 -0400)
services/crunch/crunch-job
patch
|
blob
|
history
diff --git
a/services/crunch/crunch-job
b/services/crunch/crunch-job
index 70acfef37ab8b8a8f323bc8b06ed08a6fa74bf33..ed2c059a11aaea0475dfa9032e7416a636249a75 100755
(executable)
--- a/
services/crunch/crunch-job
+++ b/
services/crunch/crunch-job
@@
-275,9
+275,9
@@
else
'qsequence' => 0,
'parameters' => {},
});
'qsequence' => 0,
'parameters' => {},
});
- push @jobstep, {
level
=> 0,
-
attempts
=> 0,
-
arvados_task
=> $first_task,
+ push @jobstep, {
'level'
=> 0,
+
'attempts'
=> 0,
+
'arvados_task'
=> $first_task,
};
push @jobstep_todo, 0;
}
};
push @jobstep_todo, 0;
}
@@
-681,7
+681,7
@@
goto ONELEVEL if !defined $success;
release_allocation();
freeze();
$Job->{'output'} = &collate_output();
release_allocation();
freeze();
$Job->{'output'} = &collate_output();
-$Job->{'success'} =
0 if !$Job->{'output'}
;
+$Job->{'success'} =
$Job->{'output'} && $success
;
$Job->save;
if ($Job->{'output'})
$Job->save;
if ($Job->{'output'})
@@
-692,12
+692,8
@@
if ($Job->{'output'})
});
}
});
}
-
Log (undef, "finish");
Log (undef, "finish");
-$Job->{'success'} = $Job->{'output'} && $success;
-$Job->save;
-
save_meta();
exit 0;
save_meta();
exit 0;
@@
-735,15
+731,15
@@
sub reapchildren
my $exitcode = $?;
my $exitinfo = "exit $exitcode";
my $exitcode = $?;
my $exitinfo = "exit $exitcode";
- $Jobstep->{
arvados_task
}->reload;
- my $success = $Jobstep->{
arvados_task
}->{success};
+ $Jobstep->{
'arvados_task'
}->reload;
+ my $success = $Jobstep->{
'arvados_task'
}->{success};
Log ($jobstepid, "child $pid on $whatslot $exitinfo success=$success");
if (!defined $success) {
# task did not indicate one way or the other --> fail
Log ($jobstepid, "child $pid on $whatslot $exitinfo success=$success");
if (!defined $success) {
# task did not indicate one way or the other --> fail
- $Jobstep->{
arvados_task
}->{success} = 0;
- $Jobstep->{
arvados_task
}->save;
+ $Jobstep->{
'arvados_task'
}->{success} = 0;
+ $Jobstep->{
'arvados_task'
}->save;
$success = 0;
}
$success = 0;
}
@@
-782,7
+778,7
@@
sub reapchildren
$Jobstep->{exitcode} = $exitcode;
$Jobstep->{finishtime} = time;
process_stderr ($jobstepid, $success);
$Jobstep->{exitcode} = $exitcode;
$Jobstep->{finishtime} = time;
process_stderr ($jobstepid, $success);
- Log ($jobstepid, "output " . $Jobstep->{
arvados_task
}->{output});
+ Log ($jobstepid, "output " . $Jobstep->{
'arvados_task'
}->{output});
close $reader{$jobstepid};
delete $reader{$jobstepid};
close $reader{$jobstepid};
delete $reader{$jobstepid};
@@
-793,7
+789,7
@@
sub reapchildren
# Load new tasks
my $newtask_list = $arv->{'job_tasks'}->{'list'}->execute(
'where' => {
# Load new tasks
my $newtask_list = $arv->{'job_tasks'}->{'list'}->execute(
'where' => {
- 'created_by_job_task' => $Jobstep->{
arvados_task
}->{uuid}
+ 'created_by_job_task' => $Jobstep->{
'arvados_task'
}->{uuid}
},
'order' => 'qsequence'
);
},
'order' => 'qsequence'
);
@@
-952,8
+948,10
@@
sub collate_output
my $joboutput;
for (@jobstep)
{
my $joboutput;
for (@jobstep)
{
- next if !exists $_->{arvados_task}->{output} || $_->{exitcode} != 0;
- my $output = $_->{arvados_task}->{output};
+ next if (!exists $_->{'arvados_task'}->{output} ||
+ !$_->{'arvados_task'}->{'success'} ||
+ $_->{'exitcode'} != 0);
+ my $output = $_->{'arvados_task'}->{output};
if ($output !~ /^[0-9a-f]{32}(\+\S+)*$/)
{
$output_in_keep ||= $output =~ / [0-9a-f]{32}\S*\+K/;
if ($output !~ /^[0-9a-f]{32}(\+\S+)*$/)
{
$output_in_keep ||= $output =~ / [0-9a-f]{32}\S*\+K/;