[ARVADOS] created: aa0ae05d87711be4ba005971677d4d28849f08b9

git at public.curoverse.com git at public.curoverse.com
Mon Aug 25 09:23:40 EDT 2014


        at  aa0ae05d87711be4ba005971677d4d28849f08b9 (commit)


commit aa0ae05d87711be4ba005971677d4d28849f08b9
Author: Peter Amstutz <peter.amstutz at curoverse.com>
Date:   Mon Aug 25 09:23:34 2014 -0400

    3136: Fetch actual job objects for use in rendering pipeline jobs.

diff --git a/apps/workbench/app/helpers/pipeline_instances_helper.rb b/apps/workbench/app/helpers/pipeline_instances_helper.rb
index b282723..bce713e 100644
--- a/apps/workbench/app/helpers/pipeline_instances_helper.rb
+++ b/apps/workbench/app/helpers/pipeline_instances_helper.rb
@@ -28,6 +28,12 @@ module PipelineInstancesHelper
     ret = []
     i = -1
 
+    jobuuids = object.components.select { |cname, c| c[:job] and c[:job][:uuid] }
+    job = {}
+    Job.where(uuid: jobuuids).each do |j|
+      job[j[:uuid]] = j
+    end
+
     object.components.each do |cname, c|
       i += 1
       pj = {index: i, name: cname}
@@ -35,7 +41,11 @@ module PipelineInstancesHelper
         ret << pj
         next
       end
-      pj[:job] = c[:job].is_a?(Hash) ? c[:job] : {}
+      if c[:job] and c[:job][:uuid]
+        pj[:job] = job[c[:job][:uuid]]
+      else
+        pj[:job] = c[:job].is_a?(Hash) ? c[:job] : {}
+      end
       pj[:percent_done] = 0
       pj[:percent_running] = 0
       if pj[:job][:success]

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


hooks/post-receive
-- 




More information about the arvados-commits mailing list