From 1325f4ad272347da7ae765246f73c4ae83a2c488 Mon Sep 17 00:00:00 2001 From: Tom Clegg Date: Fri, 28 Jun 2013 10:29:41 -0400 Subject: [PATCH] update running and finished_at attributes at completion --- services/crunch/crunch-job | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) 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; } -- 2.30.2