Merge pull request #3085 from mvdbeek/fix_torque_ssh

[16.07] Finish job for Torque SSH/CLI runner
This commit is contained in:
Nicola Soranzo
2016-11-14 13:54:09 +00:00
committed by GitHub
+5 -2
View File
@@ -154,13 +154,16 @@ class ShellJobRunner( AsynchronousJobRunner ):
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: 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
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