當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。