def start(options): AMHostMonitoringService.set_ctrl_c_handler(ctrlHandler) if options.is_process: #Run as a normal process. Invoke the ServiceMain directly. stopHandler = StopHandler(AMHostMonitoringService._heventSvcStop) bind_signal_handlers(stopHandler) server_process_main(stopHandler) else: AMHostMonitoringService.Start()
def SvcDoRun(self): scmStatus = SvcStatusCallback(self) self.redirect_output_streams() stopHandler = StopHandler(AMHostMonitoringService._heventSvcStop) bind_signal_handlers(stopHandler) AMHostMonitoringService.set_ctrl_c_handler(ctrlHandler) server_process_main(stopHandler, scmStatus) pass
def start(options): AMCollectorService.set_ctrl_c_handler(ctrlHandler) if options.is_process: #Run as a normal process. Invoke the ServiceMain directly. childProc = server_process_main(options) childProc.wait() remove_file(PID_OUT_FILE) else: AMCollectorService.Start()
def SvcDoRun(self): scmStatus = SvcStatusCallback(self) properties = get_properties() self.options.debug = get_value_from_properties(properties, DEBUG_MODE_KEY, self.options.debug) self.options.suspend_start = get_value_from_properties(properties, SUSPEND_START_MODE_KEY, self.options.suspend_start) self.redirect_output_streams() childProc = server_process_main(self.options, scmStatus) if not self._StopOrWaitForChildProcessToFinish(childProc): return remove_file(PID_OUT_FILE) pass
def SvcDoRun(self): scmStatus = SvcStatusCallback(self) properties = get_properties() self.options.debug = get_value_from_properties(properties, DEBUG_MODE_KEY, self.options.debug) self.options.suspend_start = get_value_from_properties( properties, SUSPEND_START_MODE_KEY, self.options.suspend_start) self.redirect_output_streams() childProc = server_process_main(self.options, scmStatus) if not self._StopOrWaitForChildProcessToFinish(childProc): return remove_file(PID_OUT_FILE) pass