[ARVADOS] updated: 1d8f975be8d35444aca0f21a0b6c91bc4a277662
git at public.curoverse.com
git at public.curoverse.com
Thu Sep 25 21:26:30 EDT 2014
Summary of changes:
services/api/script/crunch-dispatch.rb | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
via 1d8f975be8d35444aca0f21a0b6c91bc4a277662 (commit)
from 9a15397a7e030704f63441d6e7893cb3d8be1d64 (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 1d8f975be8d35444aca0f21a0b6c91bc4a277662
Author: Peter Amstutz <peter.amstutz at curoverse.com>
Date: Thu Sep 25 21:26:27 2014 -0400
3168: Fail on git tag collision instead of putting job back into the queue.
diff --git a/services/api/script/crunch-dispatch.rb b/services/api/script/crunch-dispatch.rb
index 00b0220..53979f2 100755
--- a/services/api/script/crunch-dispatch.rb
+++ b/services/api/script/crunch-dispatch.rb
@@ -237,7 +237,7 @@ class Dispatcher
job_auth = ApiClientAuthorization.
new(user: User.where('uuid=?', job.modified_by_user_uuid).first,
api_client_id: 0)
- job_auth.save
+ job_auth.save!
crunch_job_bin = (ENV['CRUNCH_JOB_BIN'] || `which arv-crunch-job`.strip)
if crunch_job_bin == ''
@@ -296,10 +296,11 @@ class Dispatcher
else
# job tag found, check that it has the expected revision
unless tag_rev == job.script_version
- # uh oh, the tag doesn't point to the revision we were expecting.
+ # Uh oh, the tag doesn't point to the revision we were expecting.
+ # Someone has been monkeying with the job record and/or git.
$stderr.puts "dispatch: Already a tag #{job.script_version} pointing to commit #{tag_rev} but expected commit #{job.script_version}"
- sleep 1
- untake job
+ job.state = "Failed"
+ job.save!
next
end
end
-----------------------------------------------------------------------
hooks/post-receive
--
More information about the arvados-commits
mailing list