[ARVADOS] created: 1.1.1-57-g8167db3

Git user git at public.curoverse.com
Thu Nov 30 17:08:43 EST 2017


        at  8167db395a144238b1702c2bb5a40e4dd7db26ca (commit)


commit 8167db395a144238b1702c2bb5a40e4dd7db26ca
Author: Peter Amstutz <pamstutz at veritasgenetics.com>
Date:   Thu Nov 30 17:08:08 2017 -0500

    12574: Propagate changes in container priority to child container requests.
    
    Arvados-DCO-1.1-Signed-off-by: Peter Amstutz <pamstutz at veritasgenetics.com>

diff --git a/services/api/app/models/container.rb b/services/api/app/models/container.rb
index 83765fb..617902c 100644
--- a/services/api/app/models/container.rb
+++ b/services/api/app/models/container.rb
@@ -90,6 +90,14 @@ class Container < ArvadosModel
               state: ContainerRequest::Committed).
         maximum('priority')
       self.save!
+
+      # Update the priority of child container requests to match new priority
+      # of the parent container.
+      ContainerRequest.where(requesting_container_uuid: self.uuid,
+                             state: ContainerRequest::Committed).each do |cr|
+        cr.priority = self.priority
+        cr.save
+      end
     end
   end
 

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


hooks/post-receive
-- 




More information about the arvados-commits mailing list