[ARVADOS] created: ad7c6e10909fd4ac10466d62a7b3e5a77804a233
git at public.curoverse.com
git at public.curoverse.com
Fri Jul 10 10:45:30 EDT 2015
at ad7c6e10909fd4ac10466d62a7b3e5a77804a233 (commit)
commit ad7c6e10909fd4ac10466d62a7b3e5a77804a233
Author: radhika <radhika at curoverse.com>
Date: Fri Jul 10 10:44:10 2015 -0400
6445: when a task does not have finished_at time, use the finished_at time from it's job - if one is available.
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 6fa409a..b0b8601 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
@@ -12,6 +12,7 @@
<% pipeline_jobs = render_pipeline_jobs %>
<% job_uuids = pipeline_jobs.map { |j| j[:job].andand[:uuid] }.compact %>
+<% job_uuids_finished = {}; pipeline_jobs.map { |j| job_uuids_finished[j[:job].andand[:uuid]] = j[:job].andand[:finished_at] } %>
<% if @object.state == 'Paused' %>
<p>
@@ -65,11 +66,12 @@
<% end %>
for
<% cputime = tasks.map { |task|
- if task.started_at
- (if task.finished_at then task.finished_at else Time.now() end) - task.started_at
- else
- 0
- end
+ if task.started_at
+ finished_at = task.finished_at || job_uuids_finished[task.job_uuid] || Time.now()
+ finished_at - task.started_at
+ else
+ 0
+ end
}.reduce(:+) || 0 %>
<%= render_runtime(runningtime, true, false) %><% if (walltime - runningtime) > 0 %>
(<%= render_runtime(walltime - runningtime, true, false) %> queued)<% end %><% if cputime == 0 %>.<% else %>
-----------------------------------------------------------------------
hooks/post-receive
--
More information about the arvados-commits
mailing list