chore: 删心跳邮件告警 + docker healthcheck,只留 status 页 - #54
Merged
Conversation
按需求简化心跳机制:worker 卡死不再自动重启/发邮件,靠 status 页 (/system/worker 端点 + Operations 面板)发现 + 人工介入。 删除: - apps/worker/main.py:heartbeat_alert_job + _send_alert + _last_alerts + _ALERT_DEDUP_SECONDS(邮件告警去重)+ scheduler 注册。保留 _write_heartbeat/_read_heartbeat/_HEALTH_FILE(status 页读)。 - docker-compose.yml:worker healthcheck 段(不再自动重启卡死 worker)。 - scripts/worker_healthcheck.py:整个文件删除(healthcheck 脚本)。 - tests/test_repositories.py:TestWorkerAlertDedup 2 测试(测已删的 _send_alert)。 调整: - frontend Operations.tsx:过期提示从"worker 每 10min 自检发告警邮件" 改"请检查 worker 容器状态与日志,必要时手动重启"。 保留: - status 页(/system/worker 端点 + Operations 心跳面板)读共享卷心跳 展示 worker 健康时效。 - last_error 面板(topic 抓取错误展示 + 重新抓取)与心跳机制独立,保留。 - worker 写心跳逻辑(各 job 成功写心跳,status 页消费)。 验证:ruff + tsc + 61 passed(删 2 个告警去重测试)。无残留引用。
🔍 OpenCode PR Review Required这是一个受保护的分支,merge 前需要进行 code review。 请运行以下命令进行 OpenCode review: 或者在 PR 页面评论 This is an automated reminder from PR Review Gate. |
2 tasks
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.
背景
心跳机制此前分3层:①docker healthcheck 自动重启卡死 worker ②status 页人看状态 ③邮件告警主动推送。按需求简化——worker 卡死不再自动重启/发邮件,只靠 status 页发现 + 人工介入。
删除
apps/worker/main.py:heartbeat_alert_job+_send_alert+_last_alerts+_ALERT_DEDUP_SECONDS(邮件告警去重)+ scheduler 注册docker-compose.yml:worker healthcheck 段(不再自动重启)scripts/worker_healthcheck.py:整个文件删除tests/test_repositories.py:TestWorkerAlertDedup2 测试(测已删的_send_alert)保留
/system/worker端点 + Operations 心跳面板(读共享卷心跳展示时效)调整
frontend Operations.tsx:过期提示从"worker 每 10min 自检发告警邮件"改"请检查 worker 容器状态与日志,必要时手动重启"验证
_send_alert/heartbeat_alert/worker_healthcheck引用)影响