文件

25 行
601 B
Python

"""健康检查:含判题引擎连通性探测。"""
from __future__ import annotations
import logging
from fastapi import APIRouter
from app.core.config import settings
logger = logging.getLogger("fluent.api.health")
router = APIRouter(tags=["health"])
@router.get("/health")
async def health():
return {
"ok": True,
"app": settings.app_name,
"judge_engine": settings.judge_engine,
"ai_provider": settings.ai_provider,
"ai_vendor": settings.ai_vendor,
"hydro_base": settings.hydro_base if settings.judge_engine == "hydro" else None,
}