From: Peter Amstutz Date: Wed, 24 Sep 2014 17:32:01 +0000 (-0400) Subject: 3988: look at job state instead of cancelled_at to determine if the job should X-Git-Tag: 1.1.0~2157^2~11 X-Git-Url: https://git.arvados.org/arvados.git/commitdiff_plain/4c53b3aee935b41e11c71ff1468a10d6a80c390c 3988: look at job state instead of cancelled_at to determine if the job should be stopped. --- 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;