[ARVADOS] updated: 2da969ccdb4f402a44065ad36a36f915e2c44629
git at public.curoverse.com
git at public.curoverse.com
Wed Sep 17 11:13:37 EDT 2014
Summary of changes:
sdk/cli/bin/crunch-job | 13 +++++++------
1 file changed, 7 insertions(+), 6 deletions(-)
via 2da969ccdb4f402a44065ad36a36f915e2c44629 (commit)
from d8f97ca48cd194895fedbefbaa022196d25828f8 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
commit 2da969ccdb4f402a44065ad36a36f915e2c44629
Author: Tom Clegg <tom at curoverse.com>
Date: Wed Sep 17 11:13:14 2014 -0400
3550: Fix race conditions: avoid setting running/success/finished_at
attributes until output and log have been saved.
diff --git a/sdk/cli/bin/crunch-job b/sdk/cli/bin/crunch-job
index 83931f2..613be70 100755
--- a/sdk/cli/bin/crunch-job
+++ b/sdk/cli/bin/crunch-job
@@ -848,12 +848,6 @@ release_allocation();
freeze();
my $collated_output = &collate_output();
-if ($job_has_uuid) {
- $Job->update_attributes('running' => 0,
- 'success' => $collated_output && $main::success,
- 'finished_at' => scalar gmtime)
-}
-
if (!$collated_output) {
Log(undef, "output undef");
}
@@ -880,6 +874,13 @@ else {
Log (undef, "finish");
save_meta();
+
+if ($job_has_uuid) {
+ $Job->update_attributes('running' => 0,
+ 'success' => $collated_output && $main::success,
+ 'finished_at' => scalar gmtime)
+}
+
exit ($Job->{'success'} ? 1 : 0);
-----------------------------------------------------------------------
hooks/post-receive
--
More information about the arvados-commits
mailing list