[ARVADOS] updated: e6fbedf93f4db7325872537e36c4175c8fea0bea

git at public.curoverse.com git at public.curoverse.com
Tue Sep 30 22:02:01 EDT 2014


Summary of changes:
 sdk/cli/bin/arv-run-pipeline-instance | 11 ++++++-----
 1 file changed, 6 insertions(+), 5 deletions(-)

       via  e6fbedf93f4db7325872537e36c4175c8fea0bea (commit)
      from  84798b73902fdf81f68ec55365e3a356cb8dec95 (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 e6fbedf93f4db7325872537e36c4175c8fea0bea
Author: Peter Amstutz <peter.amstutz at curoverse.com>
Date:   Tue Sep 30 21:51:41 2014 -0400

    3899: Fix for counting complete/failed components refs #3899

diff --git a/sdk/cli/bin/arv-run-pipeline-instance b/sdk/cli/bin/arv-run-pipeline-instance
index ded7ab1..c6ccf84 100755
--- a/sdk/cli/bin/arv-run-pipeline-instance
+++ b/sdk/cli/bin/arv-run-pipeline-instance
@@ -652,8 +652,9 @@ class WhRunPipelineInstance
                 end
               end
             end
-          elsif c[:job][:state] == "Running"
-            # Job is still running
+          elsif ["Queued", "Running"].include? c[:job][:state]
+            # Job is running or queued to run, so indicate that pipeline
+            # should continue to run
             moretodo = true
           elsif c[:job][:state] == "Cancelled"
             debuglog "component #{cname} job #{c[:job][:uuid]} cancelled."
@@ -686,11 +687,11 @@ class WhRunPipelineInstance
       end
     end
 
-    c_in_state = @components.values.group_by { |c| 
+    c_in_state = @components.values.group_by { |c|
       c[:job] and c[:job][:state]
     }
-    succeeded = c_in_state["Complete"].count
-    failed = c_in_state["Failed"].count + c_in_state["Cancelled"].count
+    succeeded = c_in_state["Complete"].andand.count || 0
+    failed = (c_in_state["Failed"].andand.count || 0) + (c_in_state["Cancelled"].andand.count || 0)
     ended = succeeded + failed
 
     success = (succeeded == @components.length)

-----------------------------------------------------------------------


hooks/post-receive
-- 




More information about the arvados-commits mailing list