From: Phil Hodgson Date: Sat, 21 Feb 2015 09:11:43 +0000 (+0100) Subject: Merge branch 'master' into 4232-slow-pipes-n-jobs X-Git-Tag: 1.1.0~1787^2~3 X-Git-Url: https://git.arvados.org/arvados.git/commitdiff_plain/c4fa80c6ed2445e1e384455944eb6c4108906cad?hp=d8856736576e492edf08eba46b523880569e5123 Merge branch 'master' into 4232-slow-pipes-n-jobs --- diff --git a/apps/workbench/app/helpers/pipeline_instances_helper.rb b/apps/workbench/app/helpers/pipeline_instances_helper.rb index b0d5216efd..07fda05c32 100644 --- a/apps/workbench/app/helpers/pipeline_instances_helper.rb +++ b/apps/workbench/app/helpers/pipeline_instances_helper.rb @@ -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| diff --git a/apps/workbench/app/views/application/_title_and_buttons.html.erb b/apps/workbench/app/views/application/_title_and_buttons.html.erb index f794192473..31ff2e6e21 100644 --- a/apps/workbench/app/views/application/_title_and_buttons.html.erb +++ b/apps/workbench/app/views/application/_title_and_buttons.html.erb @@ -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 %> Copy to project... <% end %> <% end %> diff --git a/apps/workbench/app/views/pipeline_instances/_running_component.html.erb b/apps/workbench/app/views/pipeline_instances/_running_component.html.erb index f87dede2a6..4359860c6e 100644 --- a/apps/workbench/app/views/pipeline_instances/_running_component.html.erb +++ b/apps/workbench/app/views/pipeline_instances/_running_component.html.erb @@ -39,7 +39,7 @@ <% if current_job[:state] == "Queued" %> <%# column offset 5 %>
- <% 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 %> diff --git a/doc/user/topics/tutorial-gatk-variantfiltration.html.textile.liquid b/doc/user/topics/tutorial-gatk-variantfiltration.html.textile.liquid index fa33f67669..bf9b24272c 100644 --- a/doc/user/topics/tutorial-gatk-variantfiltration.html.textile.liquid +++ b/doc/user/topics/tutorial-gatk-variantfiltration.html.textile.liquid @@ -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":{} } diff --git a/doc/user/topics/tutorial-job1.html.textile.liquid b/doc/user/topics/tutorial-job1.html.textile.liquid index e231c9b6b9..0e8b997f9f 100644 --- a/doc/user/topics/tutorial-job1.html.textile.liquid +++ b/doc/user/topics/tutorial-job1.html.textile.liquid @@ -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":{} } @@ -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" - ] + } } diff --git a/services/api/app/models/job.rb b/services/api/app/models/job.rb index 0444528b6b..4cd25e6b6c 100644 --- a/services/api/app/models/job.rb +++ b/services/api/app/models/job.rb @@ -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 diff --git a/services/api/app/models/pipeline_instance.rb b/services/api/app/models/pipeline_instance.rb index 28345d51f5..bc10523a36 100644 --- a/services/api/app/models/pipeline_instance.rb +++ b/services/api/app/models/pipeline_instance.rb @@ -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?