From bdb71f7762196e179e495bda28f4375e5c69af31 Mon Sep 17 00:00:00 2001 From: Peter Amstutz Date: Thu, 20 Mar 2014 15:23:56 -0400 Subject: [PATCH] - Made a note about intentionally not setting "success" - Changed if c[:job][:success] == false to elsif - Changed == nil to .nil? - Removed whitespace --- sdk/cli/bin/arv-run-pipeline-instance | 3 +-- services/api/script/crunch-dispatch.rb | 9 ++------- 2 files changed, 3 insertions(+), 9 deletions(-) diff --git a/sdk/cli/bin/arv-run-pipeline-instance b/sdk/cli/bin/arv-run-pipeline-instance index 67fdd5f650..1e62a52c04 100755 --- a/sdk/cli/bin/arv-run-pipeline-instance +++ b/sdk/cli/bin/arv-run-pipeline-instance @@ -558,8 +558,7 @@ class WhRunPipelineInstance ended += 1 if c[:job][:success] == true succeeded += 1 - end - if c[:job][:success] == false + elsif c[:job][:success] == false failed += 1 end end diff --git a/services/api/script/crunch-dispatch.rb b/services/api/script/crunch-dispatch.rb index a54e8acf72..3635846030 100755 --- a/services/api/script/crunch-dispatch.rb +++ b/services/api/script/crunch-dispatch.rb @@ -309,12 +309,9 @@ class Dispatcher j_done[:wait_thr].value jobrecord = Job.find_by_uuid(job_done.uuid) - jobrecord.running = false - if jobrecord.finished_at == nil - jobrecord.finished_at = Time.now - end + jobrecord.assert_finished jobrecord.save! - + # Invalidate the per-job auth token j_done[:job_auth].update_attributes expires_at: Time.now @@ -368,8 +365,6 @@ class Dispatcher end end - - protected def did_recently(thing, min_interval) -- 2.30.2