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


Python Harness.__init__方法代码示例

本文整理汇总了Python中WMCore.Agent.Harness.Harness.__init__方法的典型用法代码示例。如果您正苦于以下问题:Python Harness.__init__方法的具体用法?Python Harness.__init__怎么用?Python Harness.__init__使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在WMCore.Agent.Harness.Harness的用法示例。


在下文中一共展示了Harness.__init__方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: __init__

# 需要导入模块: from WMCore.Agent.Harness import Harness [as 别名]
# 或者: from WMCore.Agent.Harness.Harness import __init__ [as 别名]
    def __init__(self, config):
        """
        __init__

        Initialize the Harness
        """
        Harness.__init__(self, config)
开发者ID:AndresTanasijczuk,项目名称:WMCore,代码行数:9,代码来源:JobUpdater.py

示例2: __init__

# 需要导入模块: from WMCore.Agent.Harness import Harness [as 别名]
# 或者: from WMCore.Agent.Harness.Harness import __init__ [as 别名]
    def __init__(self, config, webApp=None, testName=""):
        """
        Initialise the object, pull out the necessary pieces of the configuration
        """
        self.homepage = None
        self.mode = 'component'
        self.testName = testName
        if webApp is None:
            Harness.__init__(self, config, compName="Webtools")
            self.appconfig = config.section_(self.config.Webtools.application)
            self.app = self.config.Webtools.application
            self.secconfig = config.component_("SecurityModule")
            self.serverConfig = config.section_("Webtools")
            self.coreDatabase = config.section_("CoreDatabase")
            self.mode = 'standalone'
        else:
            Harness.__init__(self, config, compName=webApp)
            self.appconfig = config.section_(webApp)
            WMCore.WMLogging.setupRotatingHandler(os.path.join(self.appconfig.componentDir, "%s.log" % webApp))
            self.app = webApp
            self.secconfig = getattr(self.appconfig, "security")
            self.serverConfig = config.section_(webApp).section_("Webtools")
            self.coreDatabase = config.section_("CoreDatabase")

        return
开发者ID:vkuznet,项目名称:WMCore,代码行数:27,代码来源:Root.py

示例3: __init__

# 需要导入模块: from WMCore.Agent.Harness import Harness [as 别名]
# 或者: from WMCore.Agent.Harness.Harness import __init__ [as 别名]
    def __init__(self, config):
        # call the base class
        Harness.__init__(self, config)
        self.pollTime = 1

        self.config = config

        print "TaskArchiver.__init__"
开发者ID:AndrewLevin,项目名称:WMCore,代码行数:10,代码来源:TaskArchiver.py

示例4: __init__

# 需要导入模块: from WMCore.Agent.Harness import Harness [as 别名]
# 或者: from WMCore.Agent.Harness.Harness import __init__ [as 别名]
 def __init__(self, config):
     Harness.__init__(self, config)
     logging.info("%s initializing ... " % self.__class__.__name__)
     self.config = config                
     # poller instances (threads)
     self._pollers = []
     self._createPollers()
     logging.info("%s initialized." % self.__class__.__name__)
开发者ID:PerilousApricot,项目名称:WMCore-OLDOLD,代码行数:10,代码来源:AlertGenerator.py

示例5: __init__

# 需要导入模块: from WMCore.Agent.Harness import Harness [as 别名]
# 或者: from WMCore.Agent.Harness.Harness import __init__ [as 别名]
    def __init__(self, config):
        # call the base class
        Harness.__init__(self, config)
        self.pollTime = 1

        self.config = config

        print("JobTracker.__init__")
开发者ID:AndresTanasijczuk,项目名称:WMCore,代码行数:10,代码来源:JobTracker.py

示例6: __init__

# 需要导入模块: from WMCore.Agent.Harness import Harness [as 别名]
# 或者: from WMCore.Agent.Harness.Harness import __init__ [as 别名]
    def __init__(self, config):
        # call the base class
        Harness.__init__(self, config)

        self.config = config
        #self.config.JobStatusLite.pollInterval
        #self.config.JobStatusLite.queryInterval
        
        print "JobStatusLite.__init__"
开发者ID:stuartw,项目名称:WMCore,代码行数:11,代码来源:JobStatusLite.py

示例7: __init__

# 需要导入模块: from WMCore.Agent.Harness import Harness [as 别名]
# 或者: from WMCore.Agent.Harness.Harness import __init__ [as 别名]
    def __init__(self, config):
        # call the base class
        Harness.__init__(self, config)
        self.pollTime = 1

        #myThread = threading.currentThread()
        #myThread.database = os.getenv("DATABASE")

        print "JobCreator.__init__"
开发者ID:AndrewLevin,项目名称:WMCore,代码行数:11,代码来源:JobCreator.py

示例8: __init__

# 需要导入模块: from WMCore.Agent.Harness import Harness [as 别名]
# 或者: from WMCore.Agent.Harness.Harness import __init__ [as 别名]
 def __init__(self, config):
     Harness.__init__(self, config)
     self._myName = self.__class__.__name__
     self.config = config
     # instance of processor
     self._processor = None
     # instance of Receiver which owns Processor (self._processor) 
     # and runs on background
     self._receiver = None
     logging.info("%s initialized." % self._myName)
开发者ID:PerilousApricot,项目名称:WMCore-OLDOLD,代码行数:12,代码来源:AlertProcessor.py

示例9: __init__

# 需要导入模块: from WMCore.Agent.Harness import Harness [as 别名]
# 或者: from WMCore.Agent.Harness.Harness import __init__ [as 别名]
 def __init__(self, config):
     Harness.__init__(self, config)
     self.config = config
     # poller instances (threads)
     self._pollers = []
     #3602 related:
     # Harness, nor the components, handle signal.SIGTERM which
     # is used by wmcoreD --shutdown, hence shutdown sequence is not called
     # this shall later be moved into (hopefully largely improved) Harness
     signal.signal(signal.SIGTERM, self._signalHandler)
开发者ID:AndrewLevin,项目名称:WMCore,代码行数:12,代码来源:AlertGenerator.py

示例10: __init__

# 需要导入模块: from WMCore.Agent.Harness import Harness [as 别名]
# 或者: from WMCore.Agent.Harness.Harness import __init__ [as 别名]
 def __init__(self, config):
     Harness.__init__(self, config)
     logging.info("%s initializing ... " % self.__class__.__name__)
     self.config = config                
     # poller instances, its poll() will run as a background process
     self._pollers = []
     # polling processes
     self._procs = []
     self._createPollers()
     logging.info("%s initialized." % self.__class__.__name__)
开发者ID:zhiwenuil,项目名称:WMCore,代码行数:12,代码来源:AlertGenerator.py

示例11: __init__

# 需要导入模块: from WMCore.Agent.Harness import Harness [as 别名]
# 或者: from WMCore.Agent.Harness.Harness import __init__ [as 别名]
 def __init__(self, config):
     Harness.__init__(self, config)
     self.config = config
     # instance of processor
     self._processor = None
     # instance of Receiver which owns Processor (self._processor)
     # and runs on background
     self._receiver = None
     #3602 related:
     # Harness, nor the components, handle signal.SIGTERM which
     # is used by wmcoreD --shutdown, hence shutdown sequence is not called
     # this shall later be moved into (hopefully largely improved) Harness
     signal.signal(signal.SIGTERM, self._signalHandler)
开发者ID:AndresTanasijczuk,项目名称:WMCore,代码行数:15,代码来源:AlertProcessor.py

示例12: __init__

# 需要导入模块: from WMCore.Agent.Harness import Harness [as 别名]
# 或者: from WMCore.Agent.Harness.Harness import __init__ [as 别名]
 def __init__(self, config):
     """
     Constructor. Passes config to its parent WMCore.Agent.Harness.
     It also checks that some required configuration options are 
     present:
       downloadBaseUrl, sandboxBasePath, specBasePath, reportBasePath,
       pilotErrorLogPath
     """
     print "Starting TQComp..."
     Harness.__init__(self, config)
     print (config)
     
     required = ["downloadBaseUrl", "sandboxBasePath", \
                 "specBasePath", "reportBasePath", "pilotErrorLogPath"]
     for param in required:
         if not hasattr(self.config.TQComp, param):
             messg = "%s required in TQComp configuration" % param
             # TODO: What number?
             numb = 0
             raise WMException(messg, numb)
开发者ID:zhiwenuil,项目名称:WMCore,代码行数:22,代码来源:TQComp.py

示例13: __init__

# 需要导入模块: from WMCore.Agent.Harness import Harness [as 别名]
# 或者: from WMCore.Agent.Harness.Harness import __init__ [as 别名]
    def __init__(self, config):
        """ 
        __init__ 
        """

        self.jobavaliableflag = False
        self.tarPath = config.PilotManagerComponent.tarPath
        self.pilotcodeDir = config.PilotManagerComponent.pilotCode 
        self.tqServer = config.PilotManagerComponent.tqAddress
        self.emulationMode = config.PilotManagerComponent.emulationMode
        self.pilotParams = None
        try:
            cfg = loadProdAgentConfiguration()
            pilot = cfg.getConfig("Pilot")
            self.pilotParams = pilot
        except:
            logging.debug("could not load PRODAGENT_CONFIG file")
        if ( not self.pilotParams ):
            self.pilotParams={'badAttempts':6,'noTaskAttempts':6}

        Harness.__init__(self, config)
开发者ID:zhiwenuil,项目名称:WMCore,代码行数:23,代码来源:PilotManagerComponent.py

示例14: __init__

# 需要导入模块: from WMCore.Agent.Harness import Harness [as 别名]
# 或者: from WMCore.Agent.Harness.Harness import __init__ [as 别名]
    def __init__(self, config):
        # call the base class
        Harness.__init__(self, config)
        self.pollTime = 1

        logging.info("JobSubmitter.__init__")
开发者ID:AndrewLevin,项目名称:WMCore,代码行数:8,代码来源:JobSubmitter.py

示例15: __init__

# 需要导入模块: from WMCore.Agent.Harness import Harness [as 别名]
# 或者: from WMCore.Agent.Harness.Harness import __init__ [as 别名]
 def __init__(self, config):
     # call the base class
     Harness.__init__(self, config)
开发者ID:stuartw,项目名称:WMCore,代码行数:5,代码来源:HTTPFrontEnd.py


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