def run(self): log.debug("Windows Service - Starting monasca-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) self.forwarder.run()
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): 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 fast_tornado(self): a = Application(12345, {}) a._watchdog = Watchdog(6) a._tr_manager = MockTxManager() a.run()
def slow_tornado(self): a = Application(12345, self.AGENT_CONFIG) a._watchdog = Watchdog(4) a._tr_manager = MockTxManager() a.run()
def fast_tornado(self): a = Application(12345, {"bind_host": "localhost"}) a._watchdog = Watchdog(6) a._tr_manager = MockTxManager() a.run()