本文整理汇总了Python中Ganga.Core.GangaThread.GangaThread.__init__方法的典型用法代码示例。如果您正苦于以下问题:Python GangaThread.__init__方法的具体用法?Python GangaThread.__init__怎么用?Python GangaThread.__init__使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Ganga.Core.GangaThread.GangaThread
的用法示例。
在下文中一共展示了GangaThread.__init__方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: __init__
# 需要导入模块: from Ganga.Core.GangaThread import GangaThread [as 别名]
# 或者: from Ganga.Core.GangaThread.GangaThread import __init__ [as 别名]
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
示例2: __init__
# 需要导入模块: from Ganga.Core.GangaThread import GangaThread [as 别名]
# 或者: from Ganga.Core.GangaThread.GangaThread import __init__ [as 别名]
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'])
示例3: __init__
# 需要导入模块: from Ganga.Core.GangaThread import GangaThread [as 别名]
# 或者: from Ganga.Core.GangaThread.GangaThread import __init__ [as 别名]
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 = {}
示例4: __init__
# 需要导入模块: from Ganga.Core.GangaThread import GangaThread [as 别名]
# 或者: from Ganga.Core.GangaThread.GangaThread import __init__ [as 别名]
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
示例5: __init__
# 需要导入模块: from Ganga.Core.GangaThread import GangaThread [as 别名]
# 或者: from Ganga.Core.GangaThread.GangaThread import __init__ [as 别名]
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
示例6: __init__
# 需要导入模块: from Ganga.Core.GangaThread import GangaThread [as 别名]
# 或者: from Ganga.Core.GangaThread.GangaThread import __init__ [as 别名]
def __init__(self, name):
GangaThread.__init__(self, name=name)
示例7: __init__
# 需要导入模块: from Ganga.Core.GangaThread import GangaThread [as 别名]
# 或者: from Ganga.Core.GangaThread.GangaThread import __init__ [as 别名]
def __init__(self):
GangaThread.__init__(self, "LGI_Stats")
self.log = getLogger("LGI.Stats.Thread")