Skip to content

Commit

Permalink
add pool_recycle argument
Browse files Browse the repository at this point in the history
  • Loading branch information
ahdamin committed Sep 30, 2024
1 parent 07e66cf commit a83e8a9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion genotype_api/database/database.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ def initialise_database(db_uri: str) -> None:
"""Initialize the SQLAlchemy engine and session for genotype api."""
global SESSION, ENGINE

ENGINE = create_engine(db_uri, pool_pre_ping=True)
ENGINE = create_engine(db_uri, pool_pre_ping=True, pool_recycle=3600)
session_factory = sessionmaker(ENGINE)
SESSION = scoped_session(session_factory)

Expand Down

0 comments on commit a83e8a9

Please sign in to comment.