Files
wehub-resource-sync 4a19d70af1
Lint with Ruff / ruff (push) Has been cancelled
MCP Server Tests / live-mcp-tests (push) Has been cancelled
Tests / unit-tests (push) Has been cancelled
Tests / database-integration-tests (push) Has been cancelled
CodeQL Advanced / Analyze (actions) (push) Has been cancelled
CodeQL Advanced / Analyze (python) (push) Has been cancelled
Server Tests / live-server-tests (push) Has been cancelled
Pyright Type Check / pyright (push) Has been cancelled
chore: import upstream snapshot with attribution
2026-07-13 12:38:54 +08:00

30 lines
719 B
Python

from contextlib import asynccontextmanager
from fastapi import FastAPI
from fastapi.responses import JSONResponse
from graph_service.config import get_settings
from graph_service.routers import ingest, retrieve
from graph_service.zep_graphiti import initialize_graphiti
@asynccontextmanager
async def lifespan(_: FastAPI):
settings = get_settings()
await initialize_graphiti(settings)
yield
# Shutdown
# No need to close Graphiti here, as it's handled per-request
app = FastAPI(lifespan=lifespan)
app.include_router(retrieve.router)
app.include_router(ingest.router)
@app.get('/healthcheck')
async def healthcheck():
return JSONResponse(content={'status': 'healthy'}, status_code=200)