INNER CODE UNIT · Python

_ensure_fetcher

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

def _ensure_fetcher() -> Fetcher:
    global _fetcher, _cache, _breaker, _vector_store
    if _fetcher is None:
        _cache = Cache()
        _breaker = CircuitBreaker()
        # Vector store — optional, dashboard populates it alongside the MCP server
        try:
            from world_intel_mcp.vector_store import VectorStore

            _vector_store = VectorStore(enabled=True)
        except Exception:
            logger.info("Vector store unavailable in dashboard mode")
        _fetcher = Fetcher(cache=_cache, breaker=_breaker, vector_store=_vector_store)
    return _fetcher


def _open_aoi_store() -> AOIStore:
    """Open the AOI store on the same cache database the MCP server and

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…