def main(): with logging_configured(): d = Filter() try: d.run() except KeyboardInterrupt: d.stop()
def main(): with logging_configured(): c = Comparator() try: c.run() except KeyboardInterrupt: c.stop()
def main(): with logging_configured(): enricher = Enricher() try: enricher.run() except KeyboardInterrupt: enricher.stop()
def main(): with logging_configured(): if os.environ.get('n6integration_test'): # for debugging only LOGGER.setLevel(logging.DEBUG) LOGGER.addHandler(logging.StreamHandler(stream=sys.__stdout__)) d = Recorder() try: d.run() except KeyboardInterrupt: d.stop()
def main(): with logging_configured(): if 'n6integration_test' in os.environ: # for debugging only import logging import sys LOGGER.setLevel(logging.DEBUG) LOGGER.addHandler(logging.StreamHandler(stream=sys.__stdout__)) a = Aggregator() try: a.run() except KeyboardInterrupt: a.stop()
def get_app(): """ Configure an SQL engine and return Flask-Admin WSGI application object. Returns: A flask.app.Flask instance. """ with logging_configured(): monkey_patch_flask_admin() engine = SQLAuthDBConfigMixin().engine admin_panel = AdminPanel(engine) return admin_panel.app
def main(): parser = Recorder.get_arg_parser() args = Recorder.parse_only_n6_args(parser) if args.n6recorder_non_blacklist: monkey_patch_non_bl_recorder() elif args.n6recorder_blacklist is not None: monkey_patch_bl_recorder(args.n6recorder_blacklist) with logging_configured(): if os.environ.get('n6integration_test'): # for debugging only LOGGER.setLevel(logging.DEBUG) LOGGER.addHandler(logging.StreamHandler(stream=sys.__stdout__)) d = Recorder() try: d.run() except KeyboardInterrupt: d.stop()
def main(): with logging_configured(): t = DBarchiver() try: t.run() except KeyboardInterrupt: LOGGER.debug('SIGINT. waiting for ...') t.stop() except socket.timeout as exc: # at the moment need to capture sys.exit tool for monitoring LOGGER.critical('socket.timeout: %r', exc) print >> sys.stderr, exc sys.exit(1) except socket.error as exc: # at the moment need to capture sys.exit tool for monitoring LOGGER.critical('socket.error: %r', exc) print >> sys.stderr, exc sys.exit(1)
def parser_main(): with logging_configured(): init_kwargs = parser_class.get_script_init_kwargs() parser = parser_class(**init_kwargs) parser.run_handling()
def parser_main(): with logging_configured(): init_kwargs = collector_class.get_script_init_kwargs() collector = collector_class(**init_kwargs) collector.run_handling()
def run_script(cls): with logging_configured(): init_kwargs = cls.get_script_init_kwargs() parser = cls(**init_kwargs) parser.run_handling()
def _do_run(bot_class): with logging_configured(): bot_instance = bot_class() bot_instance.run()
def _run_adapter(adapter_class: Type[IntelMQAdapter]) -> None: with logging_configured(): adapter_class().run()
def run_script(cls): with logging_configured(): init_kwargs = cls.get_script_init_kwargs() collector = cls(**init_kwargs) # noqa collector.run_handling()