Skip to main content
Glama
health.py783 B
# src/server/core/health.py """Health check endpoint for the service. Returns overall status, connection health, and cache health. """ from fastapi import APIRouter from src.server.core.dependencies import Container from src.server.utils.logger import logger router = APIRouter() @router.get("/health", tags=["Health"]) async def health_check(): # Get connections from container redis_conn = Container.redis() # Simple health checks (async) - MySQL disabled redis_ok = await redis_conn.is_healthy() status = "ok" if redis_ok else "degraded" logger.info("Health check executed", redis=redis_ok) return { "status": status, "components": { "redis": redis_ok, # "mysql": mysql_ok, # MySQL disabled }, }

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/huweihua123/stock-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server