feat(backend): 增加 /api/health 健康检查接口 (GFI-05) - #15
Open
qiaobochi040726-source wants to merge 1 commit into
Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #6
改动
backend/app.py:/api/health返回体增加status: "ok"字段(保留原code/message兼容),HTTP 200,纯 JSON,不加载任何重模型/推理库backend/README.md:健康检查段落更新——路径、返回 JSON 示例、curl 示例命令backend/unittests/test_health.py(新增):3 个用例(200 + status=ok、保留兼容字段、content-type JSON);通过空壳模块占位 + sqlite 内存库规避重依赖与 MySQL验证
(422 warnings 为 SQLAlchemy 2.0 LegacyAPIWarning 等既有告警,非本次引入)
验收对照