当前位置: 首页>>代码示例>>Python>>正文


Python GangaThread.__init__方法代码示例

本文整理汇总了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
开发者ID:Erni1619,项目名称:ganga,代码行数:9,代码来源:Local_GangaMC_Service.py

示例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'])
开发者ID:wvengen,项目名称:lgipilot,代码行数:9,代码来源:PilotThread.py

示例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 = {}
开发者ID:kreczko,项目名称:ganga,代码行数:10,代码来源:SessionLock.py

示例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
开发者ID:wvengen,项目名称:lgipilot,代码行数:11,代码来源:LGIResourceThread.py

示例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
开发者ID:alexpearce,项目名称:ganga,代码行数:47,代码来源:Local_GangaMC_Service.py

示例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)
开发者ID:chrisburr,项目名称:ganga,代码行数:4,代码来源:http_server.py

示例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")
开发者ID:wvengen,项目名称:lgipilot,代码行数:5,代码来源:StatsThread.py


注:本文中的Ganga.Core.GangaThread.GangaThread.__init__方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。