Skip to content

修复启动脚本将服务异常退出当成成功的问题 - #31

Merged
Guo-Yixin merged 1 commit into
Guo-Yixin:mainfrom
runtueee:fix/issue-30-startup-exit-status
Oct 2, 2026
Merged

Guo-Yixin merged 1 commit into
Guo-Yixin:mainfrom
runtueee:fix/issue-30-startup-exit-status

Conversation

@runtueee

@runtueee runtueee commented Oct 1, 2026

Copy link
Copy Markdown
Contributor

修复启动脚本在后端或前端异常退出后仍返回成功状态的问题。

把 sys.exit(0) 移到清理逻辑之后,让服务退出时的错误信息和非零退出状态能够保留下来。Ctrl+C 仍会正常停止并清理两个服务。

补了后端失败、前端失败和 Ctrl+C 的测试。完整单元测试结果:175 通过,1 跳过(未配置 PostgreSQL 的集成测试)。

验证:.venv/bin/python -m pytest tests/unit -q

Fixes #30

@Guo-Yixin
Guo-Yixin merged commit 5868a67 into Guo-Yixin:main Oct 2, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

启动脚本会把服务异常退出当成成功

2 participants