From 2bb1d7e9c5d6b9e46590d268c42076b7deff407c Mon Sep 17 00:00:00 2001 From: cl0ete Date: Tue, 10 Dec 2024 15:44:21 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=A4=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- waypoint/services/nats_service.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/waypoint/services/nats_service.py b/waypoint/services/nats_service.py index 2045b09d6..45f2dbfe6 100644 --- a/waypoint/services/nats_service.py +++ b/waypoint/services/nats_service.py @@ -4,7 +4,6 @@ from datetime import datetime, timedelta, timezone import orjson -import tenacity from nats.errors import BadSubscriptionError, Error, TimeoutError from nats.js.api import ConsumerConfig, DeliverPolicy from nats.js.client import JetStreamContext @@ -97,7 +96,7 @@ async def pull_subscribe(config, **kwargs): logger.exception("An exception occurred subscribing to NATS") raise - def _retry_log(retry_state: RetryCallState): + def _retry_log(self, retry_state: RetryCallState): """Custom logging for retry attempts.""" if retry_state.outcome.failed: exception = retry_state.outcome.exception() @@ -192,7 +191,7 @@ async def event_generator( ) logger.debug("Successfully resubscribed to NATS.") - except Exception as e: # pylint: disable=W0718 + except Exception: # pylint: disable=W0718 logger.exception("Unexpected error in event generator: {}") stop_event.set() raise @@ -218,7 +217,7 @@ async def event_generator( state=state, ) except Exception as e: # pylint: disable=W0718 - logger.exception("Unexpected error processing events: {}", e) + logger.exception("Unexpected error processing events: {}") raise e finally: