refactor(main): rely on lifespan for db init (SP5)

This commit is contained in:
Tyler
2026-06-20 15:37:15 -06:00
parent f52eec9bad
commit 5a712e5afd
+2 -4
View File
@@ -27,10 +27,8 @@ def main() -> None:
] ]
if reload: if reload:
sys.argv.append("--reload") sys.argv.append("--reload")
# Initialize the DB (engine, migrations, schema) before the app # DB + EventBus are initialized by the FastAPI lifespan handler
# boots so the first request hits a populated database. # (cyclone.api:lifespan); no explicit pre-init is needed here.
from cyclone import db
db.init_db()
import uvicorn import uvicorn
uvicorn.main() uvicorn.main()