From: Tom Clegg Date: Fri, 28 Jun 2013 14:29:41 +0000 (-0400) Subject: update running and finished_at attributes at completion X-Git-Tag: 1.1.0~3141 X-Git-Url: https://git.arvados.org/arvados.git/commitdiff_plain/1325f4ad272347da7ae765246f73c4ae83a2c488 update running and finished_at attributes at completion --- diff --git a/services/crunch/crunch-job b/services/crunch/crunch-job index 710fc0b0c8..8c50ba6eaf 100755 --- a/services/crunch/crunch-job +++ b/services/crunch/crunch-job @@ -706,8 +706,11 @@ goto ONELEVEL if !defined $success; release_allocation(); freeze(); +$Job->reload; $Job->{'output'} = &collate_output(); +$Job->{'running'} = 0; $Job->{'success'} = $Job->{'output'} && $success; +$Job->{'finished_at'} = gmtime; $Job->save if $job_has_uuid; if ($Job->{'output'}) @@ -1108,11 +1111,11 @@ sub croak sub cleanup { return if !$job_has_uuid; - $Job->reload if $job_has_uuid; + $Job->reload; $Job->{'running'} = 0; $Job->{'success'} = 0; $Job->{'finished_at'} = gmtime; - $Job->save if $job_has_uuid; + $Job->save; }