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