Skip to content

Commit

Permalink
Reformatting
Browse files Browse the repository at this point in the history
  • Loading branch information
bram-vdberg committed Dec 13, 2024
1 parent 83e2b0b commit 6bf737c
Showing 1 changed file with 11 additions and 9 deletions.
20 changes: 11 additions & 9 deletions src/pg_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,15 +24,17 @@ class MultiInstanceDBFetcher:
def __init__(self, db_urls: list[str]):
log.info("Initializing MultiInstanceDBFetcher")
self.connections = [
create_engine(f"postgresql+psycopg2://{url}",
pool_pre_ping=True,
connect_args={
"keepalives": 1,
"keepalives_idle": 30,
"keepalives_interval": 10,
"keepalives_count": 5,
}
) for url in db_urls
create_engine(
f"postgresql+psycopg2://{url}",
pool_pre_ping=True,
connect_args={
"keepalives": 1,
"keepalives_idle": 30,
"keepalives_interval": 10,
"keepalives_count": 5,
},
)
for url in db_urls
]

@classmethod
Expand Down

0 comments on commit 6bf737c

Please sign in to comment.