From 4c53b3aee935b41e11c71ff1468a10d6a80c390c Mon Sep 17 00:00:00 2001 From: Peter Amstutz Date: Wed, 24 Sep 2014 13:32:01 -0400 Subject: [PATCH] 3988: look at job state instead of cancelled_at to determine if the job should be stopped. --- sdk/cli/bin/crunch-job | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/sdk/cli/bin/crunch-job b/sdk/cli/bin/crunch-job index 3dd1627a7d..fbd7bef9ca 100755 --- a/sdk/cli/bin/crunch-job +++ b/sdk/cli/bin/crunch-job @@ -1037,11 +1037,12 @@ sub check_refresh_wanted my $Job2 = $arv->{'jobs'}->{'get'}->execute('uuid' => $jobspec); for my $attr ('cancelled_at', 'cancelled_by_user_uuid', - 'cancelled_by_client_uuid') { + 'cancelled_by_client_uuid', + 'state') { $Job->{$attr} = $Job2->{$attr}; } - if ($Job->{'cancelled_at'}) { - Log (undef, "Job cancelled at " . $Job->{cancelled_at} . + if ($Job->{'state'} ne "Running") { + Log (undef, "Job state changed to " . $Job->{'state'} . " at " . $Job->{cancelled_at} . " by user " . $Job->{cancelled_by_user_uuid}); $main::success = 0; $main::please_freeze = 1; -- 2.30.2