本文整理匯總了Python中DIRAC.WorkloadManagementSystem.private.PilotDirector.PilotDirector.configure方法的典型用法代碼示例。如果您正苦於以下問題:Python PilotDirector.configure方法的具體用法?Python PilotDirector.configure怎麽用?Python PilotDirector.configure使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類DIRAC.WorkloadManagementSystem.private.PilotDirector.PilotDirector
的用法示例。
在下文中一共展示了PilotDirector.configure方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。
示例1: configure
# 需要導入模塊: from DIRAC.WorkloadManagementSystem.private.PilotDirector import PilotDirector [as 別名]
# 或者: from DIRAC.WorkloadManagementSystem.private.PilotDirector.PilotDirector import configure [as 別名]
def configure(self, csSection, submitPool ):
"""
Here goes common configuration for DIRAC PilotDirector
"""
PilotDirector.configure( self, csSection, submitPool )
self.reloadConfiguration( csSection, submitPool )
self.__failingCECache.purgeExpired()
self.__ticketsCECache.purgeExpired()
for ce in self.__failingCECache.getKeys():
if ce in self.computingElementDict.keys():
try:
del self.computingElementDict[ce]
except:
pass
if self.computingElementDict:
self.log.info( ' ComputingElements:', ', '.join(self.computingElementDict.keys()) )
else:
return
# FIXME: this is to start testing
_ceName, computingElementDict = self.computingElementDict.items()[0]
self.computingElement = computingElementDict['CE']
self.log.debug( self.computingElement.getCEStatus() )
self.log.info( ' SiteName:', self.siteName )
示例2: configure
# 需要導入模塊: from DIRAC.WorkloadManagementSystem.private.PilotDirector import PilotDirector [as 別名]
# 或者: from DIRAC.WorkloadManagementSystem.private.PilotDirector.PilotDirector import configure [as 別名]
def configure( self, csSection, submitPool ):
"""
Here goes common configuration for all Grid PilotDirectors
"""
PilotDirector.configure( self, csSection, submitPool )
self.reloadConfiguration( csSection, submitPool )
self.__failingWMSCache.purgeExpired()
self.__ticketsWMSCache.purgeExpired()
for rb in self.__failingWMSCache.getKeys():
if rb in self.resourceBrokers:
try:
self.resourceBrokers.remove( rb )
except:
pass
self.resourceBrokers = List.randomize( self.resourceBrokers )
if self.gridEnv:
self.log.info( ' GridEnv: ', self.gridEnv )
if self.resourceBrokers:
self.log.info( ' ResourceBrokers:', ', '.join( self.resourceBrokers ) )