개선된 pool 관리

This commit is contained in:
bluebamus committed 2025-12-30 01:01:05 +09:00
1 parent 8671a45d96
commit efddee217a
6 files changed
+504 -195

No files matched your search

+11 -3
View File
@@ -33,10 +33,18 @@ async def lifespan(app: FastAPI):
# Shutdown - 애플리케이션 종료 시
print("Shutting down...")
from app.database.session import engine
await engine.dispose()
print("Database engine disposed")
# 공유 HTTP 클라이언트 종료
from app.utils.creatomate import close_shared_client
from app.utils.upload_blob_as_request import close_shared_blob_client
await close_shared_client()
await close_shared_blob_client()
# 데이터베이스 엔진 종료
from app.database.session import dispose_engine
await dispose_engine()
# FastAPI 앱 생성 (lifespan 적용)