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


Python ddagent.Application类代码示例

本文整理汇总了Python中ddagent.Application的典型用法代码示例。如果您正苦于以下问题:Python Application类的具体用法?Python Application怎么用?Python Application使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


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

示例1: DDForwarder

class DDForwarder(multiprocessing.Process):
    def __init__(self, agentConfig, hostname):
        multiprocessing.Process.__init__(self, name='ddforwarder')
        self.config = agentConfig
        self.is_enabled = True
        self.hostname = hostname

    def run(self):
        from config import initialize_logging
        initialize_logging('windows_forwarder')
        log.debug("Windows Service - Starting forwarder")
        set_win32_cert_path()
        port = self.config.get('listen_port', 17123)
        if port is None:
            port = 17123
        else:
            port = int(port)
        app_config = get_config(parse_args=False)
        self.forwarder = Application(port, app_config, watchdog=False)
        try:
            self.forwarder.run()
        except Exception:
            log.exception("Uncaught exception in the forwarder")

    def stop(self):
        log.debug("Windows Service - Stopping forwarder")
        self.forwarder.stop()
开发者ID:PagerDuty,项目名称:dd-agent,代码行数:27,代码来源:agent.py

示例2: use_lots_of_memory

 def use_lots_of_memory(self):
     # Skip this step on travis
     if os.environ.get('TRAVIS', False): return
     a = Application(12345, {"bind_host": "localhost"})
     a._watchdog = Watchdog(30, 50)
     a._tr_manager = MemoryHogTxManager()
     a.run()
开发者ID:AirbornePorcine,项目名称:dd-agent,代码行数:7,代码来源:test_watchdog.py

示例3: DDForwarder

class DDForwarder(threading.Thread):
    def __init__(self, agentConfig):
        threading.Thread.__init__(self)
        set_win32_cert_path()
        self.config = get_config(parse_args = False)
        port = agentConfig.get('listen_port', 17123)
        if port is None:
            port = 17123
        else:
            port = int(port)
        self.port = port
        self.forwarder = Application(port, agentConfig, watchdog=False)

    def run(self):
        self.forwarder.run()        

    def stop(self):
        self.forwarder.stop()
开发者ID:CaptTofu,项目名称:dd-agent,代码行数:18,代码来源:agent.py

示例4: run

 def run(self):
     log.debug("Windows Service - Starting forwarder")
     set_win32_cert_path()
     port = self.config.get('listen_port', 17123)
     if port is None:
         port = 17123
     else:
         port = int(port)
     app_config = get_config(parse_args = False)
     self.forwarder = Application(port, app_config, watchdog=False)
     self.forwarder.run()
开发者ID:Osterjour,项目名称:dd-agent,代码行数:11,代码来源:agent.py

示例5: __init__

 def __init__(self, agentConfig):
     threading.Thread.__init__(self)
     set_win32_cert_path()
     self.config = get_config(parse_args=False)
     port = agentConfig.get("listen_port", 17123)
     if port is None:
         port = 17123
     else:
         port = int(port)
     self.port = port
     self.forwarder = Application(port, agentConfig, watchdog=False)
开发者ID:sschepens,项目名称:dd-agent,代码行数:11,代码来源:agent.py

示例6: DDForwarder

class DDForwarder(multiprocessing.Process):
    def __init__(self, agentConfig):
        multiprocessing.Process.__init__(self, name='ddforwarder')
        self.config = agentConfig

    def run(self):
        log.debug("Windows Service - Starting forwarder")
        set_win32_cert_path()
        port = self.config.get('listen_port', 17123)
        if port is None:
            port = 17123
        else:
            port = int(port)
        app_config = get_config(parse_args = False)
        self.forwarder = Application(port, app_config, watchdog=False)
        self.forwarder.run()

    def stop(self):
        log.debug("Windows Service - Stopping forwarder")
        self.forwarder.stop()
开发者ID:bakins,项目名称:dd-agent,代码行数:20,代码来源:agent.py

示例7: run

 def run(self):
     from config import initialize_logging; initialize_logging('windows_forwarder')
     log.debug("Windows Service - Starting forwarder")
     set_win32_cert_path()
     port = self.config.get('listen_port', 17123)
     if port is None:
         port = 17123
     else:
         port = int(port)
     app_config = get_config(parse_args = False)
     self.forwarder = Application(port, app_config, watchdog=False)
     try:
         self.forwarder.run()
     except Exception:
         log.exception("Uncaught exception in the forwarder")
开发者ID:jhotta,项目名称:dd-agent,代码行数:15,代码来源:agent.py

示例8: fast_tornado

 def fast_tornado(self):
     a = Application(12345, {"bind_host": "localhost"})
     a._watchdog = Watchdog(6)
     a._tr_manager = MockTxManager()
     a.run()
开发者ID:etrepum,项目名称:dd-agent,代码行数:5,代码来源:test_watchdog.py

示例9: use_lots_of_memory

 def use_lots_of_memory(self):
     a = Application(12345, {})
     a._watchdog = Watchdog(30, 50)
     a._tr_manager = MemoryHogTxManager()
     a.run()
开发者ID:dwradcliffe,项目名称:dd-agent,代码行数:5,代码来源:test_watchdog.py

示例10: fast_tornado

 def fast_tornado(self):
     a = Application(12345, {})
     a._watchdog = Watchdog(6)
     a._tr_manager = MockTxManager()
     a.run()
开发者ID:dwradcliffe,项目名称:dd-agent,代码行数:5,代码来源:test_watchdog.py

示例11: slow_tornado

 def slow_tornado(self):
     a = Application(12345, self.AGENT_CONFIG)
     a._watchdog = Watchdog(4)
     a._tr_manager = MockTxManager()
     a.run()
开发者ID:motusllc,项目名称:dd-agent,代码行数:5,代码来源:test_watchdog.py


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