Ejemplo n.º 1
0
def main():
    with logging_configured():
        d = Filter()
        try:
            d.run()
        except KeyboardInterrupt:
            d.stop()
Ejemplo n.º 2
0
def main():
    with logging_configured():
        c = Comparator()
        try:
            c.run()
        except KeyboardInterrupt:
            c.stop()
Ejemplo n.º 3
0
def main():
    with logging_configured():
        enricher = Enricher()
        try:
            enricher.run()
        except KeyboardInterrupt:
            enricher.stop()
Ejemplo n.º 4
0
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()
Ejemplo n.º 5
0
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()
Ejemplo n.º 6
0
Archivo: app.py Proyecto: tensts/n6
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
Ejemplo n.º 7
0
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()
Ejemplo n.º 8
0
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)
Ejemplo n.º 9
0
 def parser_main():
     with logging_configured():
         init_kwargs = parser_class.get_script_init_kwargs()
         parser = parser_class(**init_kwargs)
         parser.run_handling()
Ejemplo n.º 10
0
 def parser_main():
     with logging_configured():
         init_kwargs = collector_class.get_script_init_kwargs()
         collector = collector_class(**init_kwargs)
         collector.run_handling()
Ejemplo n.º 11
0
 def run_script(cls):
     with logging_configured():
         init_kwargs = cls.get_script_init_kwargs()
         parser = cls(**init_kwargs)
         parser.run_handling()
Ejemplo n.º 12
0
 def _do_run(bot_class):
     with logging_configured():
         bot_instance = bot_class()
         bot_instance.run()
Ejemplo n.º 13
0
def _run_adapter(adapter_class: Type[IntelMQAdapter]) -> None:
    with logging_configured():
        adapter_class().run()
Ejemplo n.º 14
0
 def run_script(cls):
     with logging_configured():
         init_kwargs = cls.get_script_init_kwargs()
         collector = cls(**init_kwargs)  # noqa
         collector.run_handling()