Merge branch 'master' into 4232-slow-pipes-n-jobs
authorPhil Hodgson <bitbucket@philhodgson.net>
Sat, 21 Feb 2015 09:11:43 +0000 (10:11 +0100)
committerPhil Hodgson <bitbucket@philhodgson.net>
Sat, 21 Feb 2015 09:11:43 +0000 (10:11 +0100)
apps/workbench/app/helpers/pipeline_instances_helper.rb
apps/workbench/app/views/application/_title_and_buttons.html.erb
apps/workbench/app/views/pipeline_instances/_running_component.html.erb
doc/user/topics/tutorial-gatk-variantfiltration.html.textile.liquid
doc/user/topics/tutorial-job1.html.textile.liquid
services/api/app/models/job.rb
services/api/app/models/pipeline_instance.rb

index b0d5216efd1588069050d5b0d5aa371abc07492d..07fda05c32ac4c9e07902722df45ee24436812f9 100644 (file)
@@ -89,8 +89,8 @@ module PipelineInstancesHelper
       c[:job][:uuid] if c.is_a?(Hash) and c[:job].is_a?(Hash)
     }.compact
     job = {}
-    Job.where(uuid: jobuuids).each do |j|
-      job[j[:uuid]] = j
+    jobuuids.each do |jobuuid|
+      job[jobuuid] = Job.find?(jobuuid)
     end
 
     object.components.each do |cname, c|
index f79419247321fba8aeff4f28577536613fa3833e..31ff2e6e21a6e659ad8f75d14d2630e020b4d62b 100644 (file)
@@ -27,7 +27,7 @@
              success: 'redirect-to-created-object'
            }.to_json),
           { class: "btn btn-sm btn-primary", remote: true, method: 'get',
-            title: "Make a copy this #{object_class}" }) do %>
+            title: "Make a copy of this #{object_class}" }) do %>
         <i class="fa fa-fw fa-copy"></i> Copy to project...
       <% end %>
     <% end %>
index f87dede2a6e5386f8d98251df5800982cd6e2acd..4359860c6e5529c487dd8b4a672e9058e31e1cef 100644 (file)
@@ -39,7 +39,7 @@
           <% if current_job[:state] == "Queued" %>
             <%# column offset 5 %>
             <div class="col-md-6">
-              <% queuetime = Time.now - current_job[:created_at] %>
+              <% queuetime = Time.now - Time.iso8601(current_job[:created_at]) %>
               Queued for <%= render_runtime(queuetime, true) %>.
               <% begin %>
                 <% if current_job[:queue_position] == 0 %>
index fa33f67669259dbdd820517264f06ae54678b7a7..bf9b24272ce6c6085a2956dff5c6bb6056c60833 100644 (file)
@@ -149,12 +149,7 @@ Now start a job:
  "is_locked_by_uuid":null,
  "log":null,
  "runtime_constraints":{},
- "tasks_summary":{},
- "dependencies":[
-  "5ee633fe2569d2a42dd81b07490d5d13+82",
-  "c905c8d8443a9c44274d98b7c6cfaa32+94",
-  "d237a90bae3870b3b033aea1e99de4a9+10820"
- ]
+ "tasks_summary":{}
 }
 </code></pre>
 </notextile>
index e231c9b6b9bb8f3f202a1e5d05857e7959156064..0e8b997f9f44dda73633b45122465c8950133f28 100644 (file)
@@ -73,10 +73,7 @@ Use @arv job create@ to actually submit the job.  It should print out a JSON obj
  "is_locked_by_uuid":null,
  "log":null,
  "runtime_constraints":{},
- "tasks_summary":{},
- "dependencies":[
-  "c1bad4b39ca5a924e481008009d94e32+210"
- ]
+ "tasks_summary":{}
 }
 </code></pre>
 </notextile>
@@ -132,10 +129,7 @@ On the command line, you can use @arv job get@ to access a JSON object describin
   "running":0,
   "failed":0,
   "todo":0
- },
- "dependencies":[
-  "c1bad4b39ca5a924e481008009d94e32+210"
- ]
+ }
 }
 </code></pre>
 </notextile>
index 0444528b6bda671a4327ef39fff1918fabebf9d8..4cd25e6b6c4e5dae6ec9c0095ca56ff47954bf8c 100644 (file)
@@ -43,7 +43,6 @@ class Job < ArvadosModel
     t.add :log
     t.add :runtime_constraints
     t.add :tasks_summary
-    t.add :dependencies
     t.add :nondeterministic
     t.add :repository
     t.add :supplied_script_version
@@ -194,23 +193,23 @@ class Job < ArvadosModel
     end
   end
 
-  def dependencies
-    deps = {}
-    queue = self.script_parameters.values
-    while not queue.empty?
-      queue = queue.flatten.compact.collect do |v|
-        if v.is_a? Hash
-          v.values
-        elsif v.is_a? String
-          v.match(/^(([0-9a-f]{32})\b(\+[^,]+)?,?)*$/) do |locator|
-            deps[locator.to_s] = true
-          end
-          nil
-        end
-      end
-    end
-    deps.keys
-  end
+  def dependencies
+    deps = {}
+    queue = self.script_parameters.values
+    while not queue.empty?
+      queue = queue.flatten.compact.collect do |v|
+        if v.is_a? Hash
+          v.values
+        elsif v.is_a? String
+          v.match(/^(([0-9a-f]{32})\b(\+[^,]+)?,?)*$/) do |locator|
+            deps[locator.to_s] = true
+          end
+          nil
+        end
+      end
+    end
+    deps.keys
+  end
 
   def permission_to_update
     if is_locked_by_uuid_was and !(current_user and
index 28345d51f507e8eebe9f9baf9a7640f4460a1041..bc10523a364e2951032b4defaee4cc51f690d3ec 100644 (file)
@@ -15,10 +15,8 @@ class PipelineInstance < ArvadosModel
 
   api_accessible :user, extend: :common do |t|
     t.add :pipeline_template_uuid
-    t.add :pipeline_template, :if => :pipeline_template
     t.add :name
     t.add :components
-    t.add :dependencies
     t.add :properties
     t.add :state
     t.add :components_summary
@@ -39,10 +37,6 @@ class PipelineInstance < ArvadosModel
      (Complete = 'Complete'),
     ]
 
-  def dependencies
-    dependency_search(self.components).keys
-  end
-
   # if all components have input, the pipeline is Ready
   def components_look_ready?
     if !self.components || self.components.empty?