'Recover jobs stuck in the queued/running state when Galaxy started.'

def recover(self, job, job_wrapper):

    job_state = self._job_state(job, job_wrapper)
    job_wrapper.command_line = job.get_command_line()
    state = job.get_state()
    if (state in [model.Job.states.RUNNING, model.Job.states.QUEUED]):
        log.debug(('(Pulsar/%s)    is    still    in    running    state,    adding    to    the    Pulsar    queue' % job.get_id()))
        job_state.old_state = True
        job_state.running = (state == model.Job.states.RUNNING)
        self.monitor_queue.put(job_state)
