def run(): logger = logs.prepare_submodule_logger('receiverd', settings.RPC_CONSUMER_LOG_PATH) logger.info("Starting standalone RPC consumer...") with Connection(rpc.conn_str) as conn: try: RPCConsumer(conn, NailgunReceiver).run() except (KeyboardInterrupt, SystemExit): logger.info("Stopping standalone RPC consumer...")
def run(): logger = logs.prepare_submodule_logger('assassin', settings.ASSASSIN_LOG_PATH) logger.info('Running Assassind...') try: while True: update_nodes_status(settings.KEEPALIVE['timeout'], logger) time.sleep(settings.KEEPALIVE['interval']) except (KeyboardInterrupt, SystemExit): logger.info('Stopping Assassind...') sys.exit(1)