[ARVADOS] updated: d70e5d076e907266c0f40364aaa69fdce449ce9f

git at public.curoverse.com git at public.curoverse.com
Mon Sep 22 16:44:45 EDT 2014


Summary of changes:
 services/api/db/migrate/20140918153705_add_state_to_job.rb | 2 ++
 1 file changed, 2 insertions(+)

       via  d70e5d076e907266c0f40364aaa69fdce449ce9f (commit)
      from  7e27eb2cca7e9e22ad1f56a6f0ecbbc40ad4cb64 (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 d70e5d076e907266c0f40364aaa69fdce449ce9f
Author: Tom Clegg <tom at curoverse.com>
Date:   Mon Sep 22 16:44:26 2014 -0400

    3898: Assume a job Failed if it is locked but state fields indicate Queued.

diff --git a/services/api/db/migrate/20140918153705_add_state_to_job.rb b/services/api/db/migrate/20140918153705_add_state_to_job.rb
index 7b595a3..176b0e4 100644
--- a/services/api/db/migrate/20140918153705_add_state_to_job.rb
+++ b/services/api/db/migrate/20140918153705_add_state_to_job.rb
@@ -9,6 +9,8 @@ class AddStateToJob < ActiveRecord::Migration
       Job.update_all({state: 'Failed'}, ['state is null and success = ?', false])
       Job.update_all({state: 'Complete'}, ['state is null and success = ?', true])
       Job.update_all({state: 'Running'}, ['state is null and running = ?', true])
+      # Locked, but not Running/Failed/Complete? Let's assume it failed.
+      Job.update_all({state: 'Failed'}, ['state is null and is_locked_by_uuid is not null', true])
       Job.update_all({state: 'Queued'}, ['state is null'])
     end
   end

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


hooks/post-receive
-- 




More information about the arvados-commits mailing list