chore: Sets sqlalchemy pool_size and max overflow to a hard limit instead of default values (#1133)

<!-- .github/pull_request_template.md -->

## Description
Sets sqlalchemy pool_size and max overflow to a hard limit instead of
default values

## DCO Affirmation
I affirm that all code in every commit of this pull request conforms to
the terms of the Topoteretes Developer Certificate of Origin.
This commit is contained in:
hajdul88 2025-07-23 15:36:29 +02:00 committed by GitHub
parent f77183d001
commit 1135a5e44d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -49,9 +49,16 @@ class SQLAlchemyAdapter:
run_sync(self.pull_from_s3())
self.engine = create_async_engine(
connection_string, poolclass=NullPool if "sqlite" in connection_string else None
)
if "sqlite" in connection_string:
self.engine = create_async_engine(
connection_string,
poolclass=NullPool,
)
else:
self.engine = create_async_engine(
connection_string, pool_size=12, max_overflow=12, poolclass=None
)
self.sessionmaker = async_sessionmaker(bind=self.engine, expire_on_commit=False)
async def push_to_s3(self) -> None: