Skip to content

Commit

Permalink
🤡
Browse files Browse the repository at this point in the history
  • Loading branch information
cl0ete committed Dec 10, 2024
1 parent d6941e5 commit 2bb1d7e
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions waypoint/services/nats_service.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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()
Expand Down Expand Up @@ -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
Expand All @@ -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:
Expand Down

0 comments on commit 2bb1d7e

Please sign in to comment.