Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 1 addition & 4 deletions backend/database.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,4 @@ async def init_db():
if attempt < 4:
await asyncio.sleep(wait)

import logging
logging.getLogger(__name__).error(
f"DB 초기화 최종 실패 — 앱은 계속 기동, 요청 시 재연결 시도: {last_err}"
)
raise RuntimeError(f"DB 초기화 최종 실패: {last_err}") from last_err
3 changes: 1 addition & 2 deletions backend/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,7 @@

@asynccontextmanager
async def lifespan(app: FastAPI):
import asyncio
asyncio.create_task(init_db()) # 백그라운드 실행 — 헬스체크 블로킹 방지
await init_db()
yield


Expand Down