feat: rebuild work queue api with fastapi and postgres
Some checks failed
ci / build-test-push (push) Failing after 1m42s

This commit is contained in:
Steve W
2026-04-11 19:24:52 +00:00
parent 7420adb7aa
commit fbc88bb62b
33 changed files with 1707 additions and 1132 deletions

23
app/main.py Normal file
View File

@@ -0,0 +1,23 @@
from contextlib import asynccontextmanager
from fastapi import FastAPI
from app.db import run_migrations
from app.routers.projects import router as projects_router
from app.routers.work import router as work_router
@asynccontextmanager
async def lifespan(_: FastAPI):
run_migrations()
yield
app = FastAPI(title="Work Queue API", lifespan=lifespan)
app.include_router(projects_router)
app.include_router(work_router)
@app.get("/health")
def health() -> dict[str, str]:
return {"status": "ok"}