#NEWLINE# def reissueOverLongJobs( self ) : #NEWLINE# #INDENT# '\n        Check each issued job - if it is running for longer than desirable\n        issue a kill instruction.\n        Wait for the job to die then we pass the job to processFinishedJob.\n        ' #NEWLINE# maxJobDuration = self . config . maxJobDuration #NEWLINE# jobsToKill = [ ] #NEWLINE# if ( maxJobDuration < 10000000 ) : #NEWLINE# #INDENT# runningJobs = self . batchSystem . getRunningBatchJobIDs ( ) #NEWLINE# for jobBatchSystemID in runningJobs . keys ( ) : #NEWLINE# #INDENT# if ( runningJobs [ jobBatchSystemID ] > maxJobDuration ) : #NEWLINE# #INDENT# logger . warn ( "The job: %s has been running for: %s seconds, more than the max job duration: %s, we'll kill it" , str ( self . getJobStoreID ( maxJobDuration ) ) , str ( runningJobs [ jobBatchSystemID ] ) , str ( maxJobDuration ) ) #NEWLINE# jobsToKill . append ( jobBatchSystemID ) #NEWLINE# #UNINDENT# #UNINDENT# self . killJobs ( jobsToKill )