Skip to content

Commit

Permalink
fix server url
Browse files Browse the repository at this point in the history
  • Loading branch information
FelixTJDietrich committed Aug 17, 2024
1 parent d24d4fe commit f830c25
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion server/webhook-ingest/app/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@ class Config:

settings = Settings()

logger.info(f"Loaded settings: {settings.dict()}")
logger.info(f"Loaded settings: {settings.model_dump_json()}")
4 changes: 3 additions & 1 deletion server/webhook-ingest/app/nats_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,9 @@ def __init__(self, nats_url: str, nats_auth_token: str):
self.nats_auth_token = nats_auth_token

async def connect(self):
await self.nc.connect(servers=self.nats_url, token=self.nats_auth_token)
protocol, host = self.nats_url.split("://")
server_url = f"{protocol}://{self.nats_auth_token}@{host}"
await self.nc.connect(server_url)
self.js = self.nc.jetstream()
logger.info(f"Connected to NATS at {self.nats_url}")

Expand Down

0 comments on commit f830c25

Please sign in to comment.