Skip to content

Commit

Permalink
idk4
Browse files Browse the repository at this point in the history
  • Loading branch information
FelixTJDietrich committed Aug 17, 2024
1 parent 9f76e14 commit 3cfb0d8
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions server/webhook-ingest/app/nats_client.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
import ssl

from nats.aio.client import Client as NATS
from app.config import settings
from app.logger import logger
Expand All @@ -9,14 +7,11 @@ def __init__(self):
self.nc = NATS()

async def connect(self):
ssl_context = ssl.create_default_context(ssl.Purpose.CLIENT_AUTH)
ssl_context.check_hostname = False
ssl_context.verify_mode = ssl.CERT_NONE

await self.nc.connect(
servers=settings.NATS_URL,
token=settings.NATS_AUTH_TOKEN,
tls=ssl_context,
verbose=True,
pedantic=True,
max_reconnect_attempts=-1,
allow_reconnect=True,
reconnect_time_wait=2,
Expand Down

0 comments on commit 3cfb0d8

Please sign in to comment.