Skip to content

Commit

Permalink
Refactor wkk job.py for improved readability and logging
Browse files Browse the repository at this point in the history
  • Loading branch information
m3nowak committed Oct 10, 2024
1 parent 8485efc commit 3c85852
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/rg_app/wkk/job.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,10 +66,12 @@ def extract_form_token(html: bytes) -> str:

async def main(config: Config):
nc = await nats_connect(
config.nats.url, user_credentials=config.nats.creds_path, inbox_prefix=config.nats.inbox_prefix
config.nats.url,
user_credentials=config.nats.creds_path,
inbox_prefix=config.nats.inbox_prefix,
)
js = nc.jetstream(domain=config.nats.js_domain)

logging.info(f"Connected to NATS at {config.nats.url}")
sa_engine = create_async_engine(
config.db.get_url(),
)
Expand Down

0 comments on commit 3c85852

Please sign in to comment.