fix(ops): 修复管理端 Redis 未配置与看门狗未真正周期巡检

- admin-api 的 application.yml 缺少 spring.data.redis 配置,容器内默认连
  127.0.0.1 导致 /actuator/health 返回 DOWN(redis 组件不可用);
  补齐后与 app-api 共用 REDIS_HOST/REDIS_PORT,健康检查恢复 UP
- 计划任务原先用 BootTrigger 挂 Repetition,Windows 不生效(Next Run Time
  为 N/A,9 小时只跑过一次),看门狗形同虚设;改为 TimeTrigger + PT2M
  无限重复 + StartWhenAvailable,实测每 2 分钟稳定巡检
- watchdog.ps1 的连续失败计数改为落盘 watchdog-state.json,避免每轮进程
  重启后清零导致「连续 3 次失败告警」永不触发
This commit is contained in:
Zhou Weidong authored and trae-solo-agent committed 2026-10-28 18:23:48 +08:00
1 parent 657190d5a8
commit 181b338780
3 files changed
+32 -3

No files matched your search

@@ -14,6 +14,12 @@ spring:
url: ${DB_URL:jdbc:postgresql://127.0.0.1:5432/fruitshorts}
username: ${DB_USER:fruitshorts}
password: ${DB_PASSWORD:fruitshorts}
data:
redis:
# 与 app-api 共用同一个 Redis 实例;容器内必须显式指定 host,
# 否则 Spring Boot 默认连 127.0.0.1(容器内即自身)导致健康检查报 DOWN。
host: ${REDIS_HOST:127.0.0.1}
port: ${REDIS_PORT:6379}
jackson:
date-format: yyyy-MM-dd HH:mm:ss
time-zone: Asia/Shanghai