Merge pull request #56 from ThomasRubini/sqlalchemy_timeout

This commit is contained in:
Thomas Rubini 2023-01-16 10:38:46 +01:00 committed by GitHub
commit 5a0a4d81e4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -14,7 +14,7 @@ url_object = eg.URL.create(
port=os.getenv("DB_PORT"),
database=os.getenv("DB_DBNAME"),
)
engine = create_engine(url_object)
engine = create_engine(url_object, pool_pre_ping=True, pool_recycle=300)
session = Session(engine)