From 20f98df554f502bddff1f22879bf867f97ab7288 Mon Sep 17 00:00:00 2001 From: mvdbeek Date: Mon, 24 Oct 2016 15:58:30 +0000 Subject: [PATCH 1/2] Finish job for Torque SSH runner --- lib/galaxy/jobs/runners/cli.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/lib/galaxy/jobs/runners/cli.py b/lib/galaxy/jobs/runners/cli.py index 20bb6d821a0f..3b247be7ea8f 100644 --- a/lib/galaxy/jobs/runners/cli.py +++ b/lib/galaxy/jobs/runners/cli.py @@ -154,13 +154,16 @@ def check_watched_items( self ): ajs.job_wrapper.change_state( state ) else: if state != old_state: - log.debug("(%s/%s) state change: %s" % ( id_tag, external_job_id, state ) ) + log.debug("(%s/%s) state change: %s to %s" % ( id_tag, external_job_id, old_state, state ) ) ajs.job_wrapper.change_state( state ) if state == model.Job.states.RUNNING and not ajs.running: ajs.running = True ajs.job_wrapper.change_state( model.Job.states.RUNNING ) ajs.old_state = state - new_watched.append( ajs ) + if state == model.Job.states.OK: + self.work_queue.put( ( self.finish_job, ajs ) ) + else: + new_watched.append( ajs ) # Replace the watch list with the updated version self.watched = new_watched From 61d25720661cb120afc7b44c57f41a1b245e21e4 Mon Sep 17 00:00:00 2001 From: Marius van den Beek Date: Mon, 24 Oct 2016 19:51:59 +0200 Subject: [PATCH 2/2] More explcit logging of CLI runner state change (thx @nsoranzo) --- lib/galaxy/jobs/runners/cli.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/galaxy/jobs/runners/cli.py b/lib/galaxy/jobs/runners/cli.py index 3b247be7ea8f..433550e0e2f7 100644 --- a/lib/galaxy/jobs/runners/cli.py +++ b/lib/galaxy/jobs/runners/cli.py @@ -154,7 +154,7 @@ def check_watched_items( self ): ajs.job_wrapper.change_state( state ) else: if state != old_state: - log.debug("(%s/%s) state change: %s to %s" % ( id_tag, external_job_id, old_state, state ) ) + log.debug("(%s/%s) state change: from %s to %s" % ( id_tag, external_job_id, old_state, state ) ) ajs.job_wrapper.change_state( state ) if state == model.Job.states.RUNNING and not ajs.running: ajs.running = True