Skip to content
This repository was archived by the owner on Mar 12, 2023. It is now read-only.

Commit 5cc6046

Browse files
pool_pre_ping add (#17)
1 parent 9b30d2c commit 5cc6046

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

design_bot/routes/base.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ async def dispatch(self, request: Request, call_next: RequestResponseEndpoint) -
3939
DBSessionMiddleware,
4040
db_url=settings.DB_DSN,
4141
session_args={"autocommit": True},
42+
engine_args={"pool_pre_ping": True}
4243
)
4344

4445
app.add_middleware(LimitUploadSize, max_upload_size=3145728)

design_bot/settings.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
1-
from typing import Any
2-
3-
from pydantic import BaseSettings, PostgresDsn, DirectoryPath, FilePath, Json
41
from functools import lru_cache
52

3+
from pydantic import BaseSettings, PostgresDsn, DirectoryPath
4+
65

76
class Settings(BaseSettings):
87
"""Application settings"""

0 commit comments

Comments
 (0)