INNER CODE UNIT · Python

lifespan

marc-shade/world-intel-mcp · src/world_intel_mcp/dashboard/app.py:719

async def lifespan(app):
    """Start/stop vector store worker alongside the app."""
    _ensure_fetcher()
    if _vector_store:
        await _vector_store.start()
        logger.info("Dashboard vector store worker started")
    yield
    if _vector_store:
        await _vector_store.stop()
        logger.info("Dashboard vector store worker stopped")


app = Starlette(
    routes=[
        Route("/", index),
        Route("/api/overview", api_overview),
        Route("/api/stream", api_stream),
        Route("/api/static", api_static),

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…