details:
http://www.bx.psu.edu/hg/galaxy/rev/dc5068efc3e7
changeset: 2480:dc5068efc3e7
user: Nate Coraor <nate(a)bx.psu.edu>
date: Tue Jul 14 11:33:42 2009 -0400
description:
Fix job recovery when a tool has been removed while the job is running
1 file(s) affected in this change:
lib/galaxy/jobs/__init__.py
diffs (24 lines):
diff -r 3f407d489ade -r dc5068efc3e7 lib/galaxy/jobs/__init__.py
--- a/lib/galaxy/jobs/__init__.py Fri May 22 14:46:17 2009 -0400
+++ b/lib/galaxy/jobs/__init__.py Tue Jul 14 11:33:42 2009 -0400
@@ -119,10 +119,17 @@
"""
model = self.app.model
for job in model.Job.filter( model.Job.c.state==model.Job.states.NEW ).all():
- log.debug( "no runner: %s is still in new state, adding to the jobs
queue" %job.id )
- self.queue.put( ( job.id, job.tool_id ) )
+ if job.tool_id not in self.app.toolbox.tools_by_id:
+ log.warning( "Tool '%s' removed from tool config, unable to
recover job: %s" % ( job.tool_id, job.id ) )
+ JobWrapper( job, None, self ).fail( 'This tool was disabled before
the job completed. Please contact your Galaxy administrator, or' )
+ else:
+ log.debug( "no runner: %s is still in new state, adding to the jobs
queue" %job.id )
+ self.queue.put( ( job.id, job.tool_id ) )
for job in model.Job.filter( (model.Job.c.state == model.Job.states.RUNNING) |
(model.Job.c.state == model.Job.states.QUEUED) ).all():
- if job.job_runner_name is None:
+ if job.tool_id not in self.app.toolbox.tools_by_id:
+ log.warning( "Tool '%s' removed from tool config, unable to
recover job: %s" % ( job.tool_id, job.id ) )
+ 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 ) )
else: