[ARVADOS] updated: 469f117ead24509639fb5b6ba6c9bd1b6067460c
git at public.curoverse.com
git at public.curoverse.com
Thu Sep 25 09:48:46 EDT 2014
Summary of changes:
services/api/app/models/job.rb | 15 ---------------
1 file changed, 15 deletions(-)
via 469f117ead24509639fb5b6ba6c9bd1b6067460c (commit)
from 4671db01d21dad219582444592e99a74d1fa35d8 (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 469f117ead24509639fb5b6ba6c9bd1b6067460c
Author: Peter Amstutz <peter.amstutz at curoverse.com>
Date: Thu Sep 25 09:48:38 2014 -0400
3859: Removed validate state change (not the fight with crunch-job)
diff --git a/services/api/app/models/job.rb b/services/api/app/models/job.rb
index 81744c7..ea9990d 100644
--- a/services/api/app/models/job.rb
+++ b/services/api/app/models/job.rb
@@ -14,7 +14,6 @@ class Job < ArvadosModel
validate :ensure_script_version_is_commit
validate :find_docker_image_locator
validate :validate_status
- validate :validate_state_change
has_many :commit_ancestors, :foreign_key => :descendant, :primary_key => :script_version
has_many(:nodes, foreign_key: :job_uuid, primary_key: :uuid)
@@ -331,18 +330,4 @@ class Job < ArvadosModel
end
end
- def validate_state_change
- if self.state_changed?
- if self.state_was.in? [Complete, Failed, Cancelled]
- # Once in a finished state, don't permit any changes
- errors.add :state, "invalid change from #{self.state_was} to #{self.state}"
- return false
- elsif self.state_was == Running and not self.state.in? [Complete, Failed, Cancelled]
- # From running, can only transition to a finished state
- errors.add :state, "invalid change from #{self.state_was} to #{self.state}"
- return false
- end
- end
- true
- end
end
-----------------------------------------------------------------------
hooks/post-receive
--
More information about the arvados-commits
mailing list