當前位置: 首頁>>代碼示例>>Python>>正文


Python PilotDirector.configure方法代碼示例

本文整理匯總了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 )
開發者ID:CinziaLu,項目名稱:DIRAC,代碼行數:32,代碼來源:DIRACPilotDirector.py

示例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 ) )
開發者ID:cgrefe,項目名稱:DIRAC,代碼行數:24,代碼來源:GridPilotDirector.py


注:本文中的DIRAC.WorkloadManagementSystem.private.PilotDirector.PilotDirector.configure方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。