def _execute(): daq = DAQ(sys.argv) configurator.print_config(daq.config) daq.configure_logging() config = daq.config if config.get('show_help'): configurator.show_help() return 0 _write_pid_file() signal.signal(signal.SIGINT, signal.default_int_handler) signal.signal(signal.SIGTERM, signal.default_int_handler) daq_runner = runner.DAQRunner(config) daq_runner.initialize() daq_runner.main_loop() daq_runner.cleanup() result = daq_runner.finalize() LOGGER.info('DAQ runner returned %d', result) os.remove(_PID_FILE) return result
def _execute(): config = _parse_args(sys.argv) _configure_logging(config) LOGGER.info('configuration map: %s', config) if 'show_help' in config: _show_help() return 0 _write_pid_file() signal.signal(signal.SIGINT, signal.default_int_handler) signal.signal(signal.SIGTERM, signal.default_int_handler) daq_runner = runner.DAQRunner(config) daq_runner.initialize() daq_runner.main_loop() daq_runner.cleanup() result = daq_runner.finalize() LOGGER.info('DAQ runner returned %d', result) os.remove(_PID_FILE) return result
def _execute(): config = _parse_args(sys.argv) _configure_logging(config) _write_pid_file() daq_runner = runner.DAQRunner(config) daq_runner.initialize() daq_runner.main_loop() daq_runner.cleanup() result = daq_runner.finalize() LOGGER.info('DAQ runner returned %d', result) return result