[ARVADOS] updated: 51444751090ef020a33a125c636f9afc099f6a46

git at public.curoverse.com git at public.curoverse.com
Fri Sep 19 10:19:31 EDT 2014


Summary of changes:
 services/api/app/models/job.rb | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)

       via  51444751090ef020a33a125c636f9afc099f6a46 (commit)
      from  72fb7ca979e133064f0c41193222fe352f7fbf8a (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 51444751090ef020a33a125c636f9afc099f6a46
Author: radhika <radhika at curoverse.com>
Date:   Fri Sep 19 10:19:08 2014 -0400

    3898: look for success before running.

diff --git a/services/api/app/models/job.rb b/services/api/app/models/job.rb
index e55308a..cbfe46d 100644
--- a/services/api/app/models/job.rb
+++ b/services/api/app/models/job.rb
@@ -280,13 +280,6 @@ class Job < ArvadosModel
         self.running = false
         self.success = true
       end
-    elsif 'running'.in? changed_attributes
-      if self.running
-        self.state = Running
-        if !self.started_at
-          self.started_at = Time.now
-        end
-      end
     elsif 'success'.in? changed_attributes
       if self.success
         self.state = Complete
@@ -300,6 +293,13 @@ class Job < ArvadosModel
     elsif 'cancelled_at'.in? changed_attributes
       self.state = Cancelled
       self.running = false
+    elsif 'running'.in? changed_attributes
+      if self.running
+        self.state = Running
+        if !self.started_at
+          self.started_at = Time.now
+        end
+      end
     end
     true
   end

-----------------------------------------------------------------------


hooks/post-receive
-- 




More information about the arvados-commits mailing list