Commit 2237621d50ffd1fb2b65bc90b6d63566be3eb1e1

Authored by yibo
1 parent bd0f3684

fix(index): 僵尸 goal 扫描启动日志改为无条件打印 (T-mt628pke)

swept=0 时原来完全不打日志,导致"扫描确实跑过但没找到"和"扫描压根没
跑起来"在日志里长一个样——这正是本次要修的那类静默失败。改成不管
swept 是否为 0 都打一行,运维靠这行就能确认扫描器真正跑起来了。

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Showing 1 changed file with 3 additions and 1 deletions
server/index.js
... ... @@ -166,7 +166,9 @@ async function start() {
166 166 // 开机补一次全量扫描,再起周期性心跳兜底(同 wallclock 看门狗的形状)。
167 167 try {
168 168 const swept = taskSettle.sweepStuckActiveGoals();
169   - if (swept) console.log(`[Startup] 🧟 僵尸 goal 扫描:开机收口 ${swept} 条`);
  169 + // 无条件打印:swept=0 时也要留痕,否则"扫描确实跑过但没找到"和"扫描压根没跑起来"
  170 + // 在日志里长一个样——而这正是这次要修的那类静默失败。
  171 + console.log(`[Startup] 🧟 僵尸 goal 扫描:开机收口 ${swept} 条`);
170 172 taskSettle.startZombieGoalSweeper();
171 173 } catch (err) {
172 174 console.error('[Startup] 僵尸 goal 扫描启动失败:', err.message);
... ...