def __init__(self, name): is_critical = not config['enable_multiThreadMon'] GangaThread.__init__(self, name, critical=is_critical) self._currently_running_command = False self._running_cmd = None self._running_args = None self._thread_name = name
def __init__(self): GangaThread.__init__(self, 'LGI_Pilot') self.log = getLogger('LGI.Pilot.Thread') if not os.path.exists(config['PilotScript']): self.log.error('pilotjob script not found: '+config['PilotScript']) if not os.path.exists(config['PilotDist']): self.log.error('pilotjob tarball not found: '+config['PilotDist'])
def __init__(self, session_name, sdir, fn, repo, afs): GangaThread.__init__(self, name="SessionLockRefresher", critical=False) self.session_name = session_name self.sdir = sdir self.fns = [fn] self.repos = [repo] self.afs = afs self.FileCheckTimes = {}
def __init__(self, session_name, sdir, fn, repo, afs): GangaThread.__init__(self, name='SessionLockRefresher', critical=True) self.session_name = session_name self.sdir = sdir self.fns = [fn] self.repos = [repo] self.afs = afs self.FileCheckTimes = {}
def __init__(self): GangaThread.__init__(self, 'LGI_Resource') self.log = getLogger('LGI.Resource.Thread') config = Config.getConfig('LGI') if not os.path.exists(config['PilotDist']): self.log.error('cannot connect to LGI server: pilotjob tarball not found: '+config['PilotDist']) self.res = LGI.Resource(config['PilotDist']) # number of queued LGI jobs self.queued = None
def __init__(self, registry): GangaThread.__init__(self, name="JobRegistry_Monitor") log.debug("Constructing JobRegistry_Monitor") self.setDaemon(True) self.registry = registry self.__sleepCounter = 0.0 self.__updateTimeStamp = time.time() self.progressCallback = lambda x: None self.callbackHookDict = {} self.clientCallbackDict = {} self.alive = True self.enabled = False # run the monitoring loop continuosly (steps=-1) or just a specified # number of steps(>0) self.steps = -1 self.activeBackends = {} self.updateJobStatus = None self.errors = {} # Create the default backend update method and add to callback hook. self.makeUpdateJobStatusFunction() # Add credential checking to monitoring loop for _credObj in Credentials._allCredentials.itervalues(): log.debug("Setting callback hook for %s" % getName(_credObj)) self.setCallbackHook(self.makeCredCheckJobInsertor(_credObj), {}, True, timeout=config['creds_poll_rate']) # Add low disk-space checking to monitoring loop log.debug("Setting callback hook for disk space checking") self.setCallbackHook(self.diskSpaceCheckJobInsertor, {}, True, timeout=config['diskspace_poll_rate']) # synch objects # main loop mutex self.__mainLoopCond = threading.Condition() # cleanup synch self.__cleanUpEvent = threading.Event() # asynch mon loop running synch self.__monStepsTerminatedEvent = threading.Event() # event to signal the break of job lists iterators self.stopIter = threading.Event() self.stopIter.set() self._runningNow = False
def __init__(self, registry): GangaThread.__init__(self, name="JobRegistry_Monitor") log.debug("Constructing JobRegistry_Monitor") self.setDaemon(True) self.registry = registry self.__sleepCounter = 0.0 self.__updateTimeStamp = time.time() self.progressCallback = lambda x: None self.callbackHookDict = {} self.clientCallbackDict = {} self.alive = True self.enabled = False # run the monitoring loop continuosly (steps=-1) or just a specified # number of steps(>0) self.steps = -1 self.activeBackends = {} self.updateJobStatus = None self.errors = {} self.updateDict_ts = SynchronisedObject(UpdateDict()) # Create the default backend update method and add to callback hook. self.makeUpdateJobStatusFunction() # Add credential checking to monitoring loop for _credObj in Credentials._allCredentials.itervalues(): log.debug("Setting callback hook for %s" % getName(_credObj)) self.setCallbackHook(self.makeCredCheckJobInsertor(_credObj), {}, True, timeout=config['creds_poll_rate']) # Add low disk-space checking to monitoring loop log.debug("Setting callback hook for disk space checking") self.setCallbackHook(self.diskSpaceCheckJobInsertor, {}, True, timeout=config['diskspace_poll_rate']) # synch objects # main loop mutex self.__mainLoopCond = threading.Condition() # cleanup synch self.__cleanUpEvent = threading.Event() # asynch mon loop running synch self.__monStepsTerminatedEvent = threading.Event() # event to signal the break of job lists iterators self.stopIter = threading.Event() self.stopIter.set() self._runningNow = False
def __init__(self, name): GangaThread.__init__(self, name) self._currently_running_command = False self._running_cmd = None self._thread_name = name
def __init__(self, name): GangaThread.__init__(self, name=name)
def __init__(self, name): GangaThread.__init__(self, name)
def __init__(self): GangaThread.__init__(self, "LGI_Stats") self.log = getLogger("LGI.Stats.Thread")