mirror of
https://github.com/rzmk/learnhouse.git
synced 2025-12-19 04:19:25 +00:00
chore: update database connection settings with pool size and timeout configurations
This commit is contained in:
parent
3a95abfa6f
commit
6ebac01c61
1 changed files with 5 additions and 1 deletions
|
|
@ -35,7 +35,11 @@ learnhouse_config = get_learnhouse_config()
|
|||
engine = create_engine(
|
||||
learnhouse_config.database_config.sql_connection_string, # type: ignore
|
||||
echo=False,
|
||||
pool_pre_ping=True # type: ignore
|
||||
pool_pre_ping=True, # type: ignore
|
||||
pool_size=10,
|
||||
max_overflow=20,
|
||||
pool_recycle=300, # Recycle connections after 5 minutes
|
||||
pool_timeout=30
|
||||
)
|
||||
|
||||
# Create all tables after importing all models
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue