Fix backend startup: add retry logic for DB init, proper logging, ensure all models imported before create_all, increase healthcheck start_period

This commit is contained in:
claude 2026-03-15 00:34:39 +00:00
parent 00c58c6f62
commit 16d00fbd1b
3 changed files with 45 additions and 13 deletions

View file

@ -25,5 +25,8 @@ async def get_db():
async def init_db():
# Import all models so their tables are registered on Base.metadata
import app.models # noqa: F401
async with engine.begin() as conn:
await conn.run_sync(Base.metadata.create_all)