Skip to content

Commit

Permalink
🎨
Browse files Browse the repository at this point in the history
  • Loading branch information
cl0ete committed Dec 11, 2024
1 parent 0a44045 commit 31acc90
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions endorser/services/endorsement_processor.py
Original file line number Diff line number Diff line change
Expand Up @@ -189,10 +189,10 @@ async def _subscribe(self) -> JetStreamContext.PullSubscription:
"""
logger.info("Subscribing to NATS subject: {}", self.endorser_nats_subject)
subscribe_kwargs = {
"subject": self.endorser_nats_subject,
"durable": ENDORSER_DURABLE_CONSUMER,
"stream": NATS_STREAM,
}
"subject": self.endorser_nats_subject,
"durable": ENDORSER_DURABLE_CONSUMER,
"stream": NATS_STREAM,
}

@retry(
retry=retry_if_exception_type(TimeoutError),
Expand All @@ -211,6 +211,7 @@ async def pull_subscribe(**kwargs):
except Exception: # pylint: disable=W0703
logger.exception("Unknown error subscribing to NATS subject")
raise

try:
return await pull_subscribe(**subscribe_kwargs)
except Exception: # pylint: disable=W0703
Expand Down

0 comments on commit 31acc90

Please sign in to comment.