mirror of
https://github.com/fastapiadmin/FastapiAdmin.git
synced 2026-09-26 22:31:21 +00:00
- 重构工作流模块目录结构,迁移代码文件 - 修复类型断言空值安全问题,添加 ! 操作符 - 优化样式类名,替换 flex-cc 为标准 flex 工具类 - 更新路由标签简化文案,移除冗余注释 - 调整 ruff 配置,放宽行长度限制 - 更新 README 与多语言文案,优化项目描述 - 修复表单、图表组件的类型与样式问题 - 简化搜索表单、数据卡片的布局代码
33 lines
560 B
Python
33 lines
560 B
Python
"""健康检查 Schema"""
|
|
|
|
from __future__ import annotations
|
|
|
|
from pydantic import BaseModel
|
|
|
|
|
|
class DependencyStatus(BaseModel):
|
|
"""依赖状态"""
|
|
|
|
status: str
|
|
latency_ms: float | None = None
|
|
|
|
|
|
class HealthOut(BaseModel):
|
|
"""基础健康检查响应"""
|
|
|
|
status: str
|
|
timestamp: str
|
|
version: str
|
|
uptime_seconds: float
|
|
|
|
|
|
class ReadinessOut(BaseModel):
|
|
"""就绪探针响应"""
|
|
|
|
status: str
|
|
timestamp: str
|
|
version: str
|
|
uptime_seconds: float
|
|
dependencies: dict[str, DependencyStatus]
|
|
disk_usage: float
|