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:
1 parent
657190d5a8
commit
181b338780
3 files changed
+32
-3
No files matched your search
@@ -17,11 +17,17 @@
|
||||
<ExecutionTimeLimit>PT10M</ExecutionTimeLimit>
|
||||
</Settings>
|
||||
<Triggers>
|
||||
<BootTrigger>
|
||||
<!-- BootTrigger 上挂 <Repetition> 在 Windows 计划任务里不生效(导入后 Next Run Time 为 N/A,
|
||||
实际只在开机跑一次)。改成 TimeTrigger + 无限重复,配合 StartWhenAvailable
|
||||
保证开机后若错过也会立即补跑;这样才真正做到每 2 分钟巡检一次。 -->
|
||||
<TimeTrigger>
|
||||
<StartBoundary>2026-01-01T00:00:00</StartBoundary>
|
||||
<Repetition>
|
||||
<Interval>PT2M</Interval>
|
||||
<Duration>P3650D</Duration>
|
||||
<StopAtDurationEnd>false</StopAtDurationEnd>
|
||||
</Repetition>
|
||||
</BootTrigger>
|
||||
</TimeTrigger>
|
||||
</Triggers>
|
||||
<Actions Context="Author">
|
||||
<Exec>
|
||||
|
||||
Reference in new issue
Block a user