修复启动脚本将服务异常退出当成成功的问题 - #31
Merged
Guo-Yixin merged 1 commit intoOct 2, 2026
Merged
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.
修复启动脚本在后端或前端异常退出后仍返回成功状态的问题。
把
sys.exit(0)移到清理逻辑之后,让服务退出时的错误信息和非零退出状态能够保留下来。Ctrl+C 仍会正常停止并清理两个服务。补了后端失败、前端失败和 Ctrl+C 的测试。完整单元测试结果:175 通过,1 跳过(未配置 PostgreSQL 的集成测试)。
验证:
.venv/bin/python -m pytest tests/unit -qFixes #30