[ARVADOS] updated: eaf8fb3be8218971b9a66d10b7bbabbbf92cd041
git at public.curoverse.com
git at public.curoverse.com
Fri Sep 26 10:20:26 EDT 2014
Summary of changes:
.../app/helpers/pipeline_instances_helper.rb | 26 +++++++++++-----------
services/api/test/fixtures/jobs.yml | 2 +-
2 files changed, 14 insertions(+), 14 deletions(-)
via eaf8fb3be8218971b9a66d10b7bbabbbf92cd041 (commit)
from a3787ef83a0538097fb6f802f675be740a241ebc (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 eaf8fb3be8218971b9a66d10b7bbabbbf92cd041
Author: Peter Amstutz <peter.amstutz at curoverse.com>
Date: Fri Sep 26 10:20:15 2014 -0400
3899: pipeline_instances_helper: Don't set :state if it's already set. Add newline to jobs.yml.
diff --git a/apps/workbench/app/helpers/pipeline_instances_helper.rb b/apps/workbench/app/helpers/pipeline_instances_helper.rb
index 78f491a..ef787b3 100644
--- a/apps/workbench/app/helpers/pipeline_instances_helper.rb
+++ b/apps/workbench/app/helpers/pipeline_instances_helper.rb
@@ -90,7 +90,7 @@ module PipelineInstancesHelper
}.compact
job = {}
Job.where(uuid: jobuuids).each do |j|
- job[j[:uuid]] = j
+ #job[j[:uuid]] = j
end
object.components.each do |cname, c|
@@ -105,18 +105,18 @@ module PipelineInstancesHelper
else
pj[:job] = c[:job].is_a?(Hash) ? c[:job] : {}
- # Figure out the state based on the other fields.
- pj[:job][:state] = if pj[:job][:cancelled_at]
- "Cancelled"
- elsif pj[:job][:success] == false
- "Failed"
- elsif pj[:job][:success] == true
- "Complete"
- elsif pj[:job][:running] == true
- "Running"
- else
- "Queued"
- end
+ # If necessary, figure out the state based on the other fields.
+ pj[:job][:state] ||= if pj[:job][:cancelled_at]
+ "Cancelled"
+ elsif pj[:job][:success] == false
+ "Failed"
+ elsif pj[:job][:success] == true
+ "Complete"
+ elsif pj[:job][:running] == true
+ "Running"
+ else
+ "Queued"
+ end
end
pj[:percent_done] = 0
pj[:percent_running] = 0
diff --git a/services/api/test/fixtures/jobs.yml b/services/api/test/fixtures/jobs.yml
index a591e67..b84922d 100644
--- a/services/api/test/fixtures/jobs.yml
+++ b/services/api/test/fixtures/jobs.yml
@@ -222,4 +222,4 @@ queued:
is_locked_by_uuid: ~
tasks_summary: {}
runtime_constraints: {}
- state: Queued
\ No newline at end of file
+ state: Queued
-----------------------------------------------------------------------
hooks/post-receive
--
More information about the arvados-commits
mailing list