[ARVADOS] updated: 79deba45d38e64a10105526f4cf2d5fccbc4916a

git at public.curoverse.com git at public.curoverse.com
Fri Sep 26 14:53:09 EDT 2014


Summary of changes:
 sdk/cli/bin/arv-run-pipeline-instance | 8 ++++----
 sdk/cli/bin/crunch-job                | 6 +++++-
 2 files changed, 9 insertions(+), 5 deletions(-)

       via  79deba45d38e64a10105526f4cf2d5fccbc4916a (commit)
      from  d79ca2ad99aceb528b1033a73035e6961aa25ba7 (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 79deba45d38e64a10105526f4cf2d5fccbc4916a
Author: Peter Amstutz <peter.amstutz at curoverse.com>
Date:   Fri Sep 26 14:53:02 2014 -0400

    3859: Add --local-job to explicitly specify whether job is "local" or not.  Fix
    overly clever code to count number of successes/failures in
    arv-run-pipeline-instance.

diff --git a/sdk/cli/bin/arv-run-pipeline-instance b/sdk/cli/bin/arv-run-pipeline-instance
index ded7ab1..dbb00bd 100755
--- a/sdk/cli/bin/arv-run-pipeline-instance
+++ b/sdk/cli/bin/arv-run-pipeline-instance
@@ -551,7 +551,7 @@ class WhRunPipelineInstance
           report_status
           begin
             require 'open3'
-            Open3.popen3("arv-crunch-job", "--force-unlock",
+            Open3.popen3("arv-crunch-job", "--force-unlock", "--local-job",
                          "--job", c[:job][:uuid]) do |stdin, stdout, stderr, wait_thr|
               debuglog "arv-crunch-job pid #{wait_thr.pid} started", 0
               stdin.close
@@ -652,7 +652,7 @@ class WhRunPipelineInstance
                 end
               end
             end
-          elsif c[:job][:state] == "Running"
+          elsif ["Queued", "Running"].include? c[:job][:state]
             # Job is still running
             moretodo = true
           elsif c[:job][:state] == "Cancelled"
@@ -689,8 +689,8 @@ class WhRunPipelineInstance
     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)
diff --git a/sdk/cli/bin/crunch-job b/sdk/cli/bin/crunch-job
index 2a4675b..c0baa30 100755
--- a/sdk/cli/bin/crunch-job
+++ b/sdk/cli/bin/crunch-job
@@ -112,7 +112,9 @@ my $jobspec;
 my $job_api_token;
 my $no_clear_tmp;
 my $resume_stash;
+my $local_job;
 GetOptions('force-unlock' => \$force_unlock,
+           'local-job' => \$local_job,
            'git-dir=s' => \$git_dir,
            'job=s' => \$jobspec,
            'job-api-token=s' => \$job_api_token,
@@ -126,7 +128,9 @@ if (defined $job_api_token) {
 
 my $have_slurm = exists $ENV{SLURM_JOBID} && exists $ENV{SLURM_NODELIST};
 my $job_has_uuid = $jobspec =~ /^[-a-z\d]+$/;
-my $local_job = !$job_has_uuid;
+if (!$local_job) {
+  $local_job = !$job_has_uuid;
+}
 
 
 $SIG{'USR1'} = sub

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


hooks/post-receive
-- 




More information about the arvados-commits mailing list