def processRetries(self, jobs, cooloffType): """ _processRetries_ Actually does the dirty work of figuring out what to do with jobs """ if len(jobs) < 1: # We got no jobs? return transitions = Transitions() oldstate = '%scooloff' % cooloffType if oldstate not in transitions.keys(): msg = 'Unknown job type %s' % cooloffType logging.error(msg) self.sendAlert(6, msg=msg) return propList = [] newJobState = transitions[oldstate][0] jobList = self.loadJobsFromList(idList=jobs) # Now we should have the jobs propList = self.selectRetryAlgo(jobList, cooloffType) if len(propList) > 0: self.changeState.propagate(propList, newJobState, oldstate) return
def processRetries(self, jobs, cooloffType): """ _processRetries_ Actually does the dirty work of figuring out what to do with jobs """ if len(jobs) < 1: # We got no jobs? return transitions = Transitions() oldstate = '%scooloff' % (cooloffType) if not oldstate in transitions.keys(): msg = 'Unknown job type %s' % (cooloffType) logging.error(msg) self.sendAlert(6, msg = msg) return propList = [] newJobState = transitions[oldstate][0] jobList = self.loadJobsFromList(idList = jobs) # Now we should have the jobs propList = self.selectRetryAlgo(jobList, cooloffType) if len(propList) > 0: self.changeState.propagate(propList, newJobState, oldstate) return