backend api 추가

This commit is contained in:
jaehwang committed 2026-09-08 13:00:23 +09:00
1 parent 2d4201ce9e
commit f008ed4010
15 files changed
+1501 -5

No files matched your search

+26 -1
View File
@@ -1,3 +1,28 @@
from contextlib import asynccontextmanager
from fastapi import FastAPI
app = FastAPI(title="poster-alive")
from pipelines import worker
from routers import f1, playreel
from utils import blob
from utils.database import close_engine
@asynccontextmanager
async def lifespan(app: FastAPI):
worker.start()
yield
await worker.stop()
await blob.close_client()
await close_engine()
app = FastAPI(title="poster-alive", lifespan=lifespan)
app.include_router(f1.router)
app.include_router(playreel.router)
@app.get("/api/health")
async def health():
return {"ok": True}