Skip to content

Commit

Permalink
Remove heartbeat from fetch
Browse files Browse the repository at this point in the history
  • Loading branch information
wdbasson committed Feb 16, 2025
1 parent 3da632f commit 7ad3f73
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 @@ -168,9 +168,7 @@ async def event_generator(*, subscription: JetStreamContext.PullSubscription):
break

try:
messages = await subscription.fetch(
batch=5, timeout=0.5, heartbeat=0.2
)
messages = await subscription.fetch(batch=5, timeout=0.5)
for message in messages:
event = orjson.loads(message.data)
bound_logger.trace("Received event: {}", event)
Expand All @@ -192,7 +190,8 @@ async def event_generator(*, subscription: JetStreamContext.PullSubscription):
except BadSubscriptionError as e:
# If we can't unsubscribe, log the error and continue
bound_logger.warning(
"BadSubscriptionError unsubscribing from NATS: {}", e
"BadSubscriptionError unsubscribing from NATS after subscription lost: {}",
e,
)

subscription = await self._subscribe(
Expand Down

0 comments on commit 7ad3f73

Please sign in to comment.