mirror of
https://github.com/galaxyproject/galaxy.git
synced 2026-09-24 16:30:27 +08:00
Some job runner fixes.
This commit is contained in:
@@ -64,7 +64,7 @@ class JobQueue( object ):
|
||||
"""Start the job manager"""
|
||||
self.app = app
|
||||
# Should we use IPC to communicate (needed if forking)
|
||||
self.track_jobs_in_database = app.config.get( 'track_jobs_in_database', False )
|
||||
self.track_jobs_in_database = app.config.get_bool( 'track_jobs_in_database', False )
|
||||
|
||||
# Check if any special scheduling policy should be used. If not, default is FIFO.
|
||||
sched_policy = app.config.get('job_scheduler_policy', 'FIFO')
|
||||
@@ -107,7 +107,8 @@ class JobQueue( object ):
|
||||
self.monitor_thread = threading.Thread( target=self.monitor )
|
||||
self.monitor_thread.start()
|
||||
log.info( "job manager started" )
|
||||
self.check_jobs_at_startup()
|
||||
if self.track_jobs_in_database:
|
||||
self.check_jobs_at_startup()
|
||||
|
||||
def check_jobs_at_startup( self ):
|
||||
"""
|
||||
|
||||
@@ -267,7 +267,10 @@ class PBSJobRunner( object ):
|
||||
except Empty:
|
||||
pass
|
||||
# Iterate over the list of watched jobs and check state
|
||||
self.check_watched_items()
|
||||
try:
|
||||
self.check_watched_items()
|
||||
except:
|
||||
log.exception( "Uncaught exception checking jobs" )
|
||||
# Sleep a bit before the next state check
|
||||
time.sleep( 1 )
|
||||
|
||||
|
||||
Reference in New Issue
Block a user