[ARVADOS] updated: cf5ffa1f9c3d24fe828cee0993a2e7870719f7e7
git at public.curoverse.com
git at public.curoverse.com
Wed Aug 27 09:33:10 EDT 2014
Summary of changes:
.../app/helpers/pipeline_components_helper.rb | 2 +-
.../views/application/_job_status_label.html.erb | 4 ++-
.../_show_components_running.html.erb | 2 +-
sdk/cli/bin/arv-run-pipeline-instance | 40 ++++++++++++----------
4 files changed, 26 insertions(+), 22 deletions(-)
via cf5ffa1f9c3d24fe828cee0993a2e7870719f7e7 (commit)
from 24c42c71335a426b1838d04698bfbcf4db39e086 (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 cf5ffa1f9c3d24fe828cee0993a2e7870719f7e7
Author: Peter Amstutz <peter.amstutz at curoverse.com>
Date: Wed Aug 27 09:33:07 2014 -0400
3342: Tweak pipeline component status rendering. Support "output_name":false
to specify no output should be added to the current project.
diff --git a/apps/workbench/app/helpers/pipeline_components_helper.rb b/apps/workbench/app/helpers/pipeline_components_helper.rb
index 44c01d6..7584011 100644
--- a/apps/workbench/app/helpers/pipeline_components_helper.rb
+++ b/apps/workbench/app/helpers/pipeline_components_helper.rb
@@ -4,7 +4,7 @@ module PipelineComponentsHelper
render(partial: "pipeline_instances/show_components_#{template_suffix}",
locals: locals)
rescue Exception => e
- logger.error e.inspect
+ logger.error "#{e.backtrace.join("\n\t")}"
case fallback
when :json
render(partial: "pipeline_instances/show_components_json")
diff --git a/apps/workbench/app/views/application/_job_status_label.html.erb b/apps/workbench/app/views/application/_job_status_label.html.erb
index 87b70fe..ae00e3a 100644
--- a/apps/workbench/app/views/application/_job_status_label.html.erb
+++ b/apps/workbench/app/views/application/_job_status_label.html.erb
@@ -6,6 +6,8 @@
<span class="label label-default"><%= if defined? title then title else 'finished' end %></span>
<% elsif j[:started_at] %>
<span class="label label-info"><%= if defined? title then title else 'running' end %></span>
+<% elsif not j.nil? %>
+ <span class="label label-default"><%= if defined? title then title else 'queued' end %></span>
<% else %>
- <span class="label label-default"><%= if defined? title then title else 'not running' end %></span>
+ <span class="label label-default"><%= if defined? title then title else 'not ready' end %></span>
<% end %>
diff --git a/apps/workbench/app/views/pipeline_instances/_show_components_running.html.erb b/apps/workbench/app/views/pipeline_instances/_show_components_running.html.erb
index fb756e3..9f46e3d 100644
--- a/apps/workbench/app/views/pipeline_instances/_show_components_running.html.erb
+++ b/apps/workbench/app/views/pipeline_instances/_show_components_running.html.erb
@@ -36,7 +36,7 @@
</td>
<% current_job = pj[:job] rescue nil %>
<td>
- <% if current_job %>
+ <% if current_job.is_a? Job %>
<%= render partial: 'show_object_button', locals: {object: current_job, size: 'xs', link_text: 'Show job details'} %>
<% end %>
</td><td>
diff --git a/sdk/cli/bin/arv-run-pipeline-instance b/sdk/cli/bin/arv-run-pipeline-instance
index c2e0145..101b4ee 100755
--- a/sdk/cli/bin/arv-run-pipeline-instance
+++ b/sdk/cli/bin/arv-run-pipeline-instance
@@ -569,25 +569,27 @@ class WhRunPipelineInstance
fetch_template(@instance[:pipeline_template_uuid])
pipeline_name = @template[:name]
end
- output_name = c[:output_name] || "Output of #{cname} of #{pipeline_name}"
- # Create a collection located in the same project as the pipeline with the contents of the output.
- portable_data_hash = c[:job][:output]
- collections = $arv.collection.list(limit: 1,
- filters: [['portable_data_hash', '=', portable_data_hash]],
- select: ["portable_data_hash", "manifest_text"]
- )[:items]
- if collections.any?
- newcollection = {
- owner_uuid: owner_uuid,
- name: "#{output_name} at #{c[:job][:finished_at]}",
- portable_data_hash: collections.first[:portable_data_hash],
- manifest_text: collections.first[:manifest_text]
- }
- debuglog "Creating collection #{newcollection}", 0
- newcollection_actual = $arv.collection.create collection: newcollection
- c[:output_uuid] = newcollection_actual[:uuid]
- else
- debuglog "Could not find a collection with portable data hash #{portable_data_hash}", 0
+ if c[:output_name] != false
+ output_name = c[:output_name] || "Output of #{cname} of #{pipeline_name}"
+ # Create a collection located in the same project as the pipeline with the contents of the output.
+ portable_data_hash = c[:job][:output]
+ collections = $arv.collection.list(limit: 1,
+ filters: [['portable_data_hash', '=', portable_data_hash]],
+ select: ["portable_data_hash", "manifest_text"]
+ )[:items]
+ if collections.any?
+ newcollection = {
+ owner_uuid: owner_uuid,
+ name: "#{output_name} at #{c[:job][:finished_at]}",
+ portable_data_hash: collections.first[:portable_data_hash],
+ manifest_text: collections.first[:manifest_text]
+ }
+ debuglog "Creating collection #{newcollection}", 0
+ newcollection_actual = $arv.collection.create collection: newcollection
+ c[:output_uuid] = newcollection_actual[:uuid]
+ else
+ debuglog "Could not find a collection with portable data hash #{portable_data_hash}", 0
+ end
end
end
elsif c[:job][:running] ||
-----------------------------------------------------------------------
hooks/post-receive
--
More information about the arvados-commits
mailing list