details: http://www.bx.psu.edu/hg/galaxy/rev/4c3cddd02b09 changeset: 3043:4c3cddd02b09 user: Nate Coraor <nate@bx.psu.edu> date: Mon Nov 16 18:38:32 2009 -0500 description: Job recovery fix for jobs queued but with no runner where track_jobs_in_database=True diffstat: lib/galaxy/jobs/__init__.py | 7 ++++++- 1 files changed, 6 insertions(+), 1 deletions(-) diffs (20 lines): diff -r df9814119044 -r 4c3cddd02b09 lib/galaxy/jobs/__init__.py --- a/lib/galaxy/jobs/__init__.py Mon Nov 16 16:27:48 2009 -0500 +++ b/lib/galaxy/jobs/__init__.py Mon Nov 16 18:38:32 2009 -0500 @@ -139,10 +139,15 @@ JobWrapper( job, None, self ).fail( 'This tool was disabled before the job completed. Please contact your Galaxy administrator, or' ) elif job.job_runner_name is None: log.debug( "no runner: %s is still in queued state, adding to the jobs queue" %job.id ) - self.queue.put( ( job.id, job.tool_id ) ) + if self.track_jobs_in_database: + job.state = model.Job.states.NEW + else: + self.queue.put( ( job.id, job.tool_id ) ) else: job_wrapper = JobWrapper( job, self.app.toolbox.tools_by_id[ job.tool_id ], self ) self.dispatcher.recover( job, job_wrapper ) + if self.sa_session.dirty: + self.sa_session.flush() def __monitor( self ): """