fix: 修复轮询系统缓存不一致和可观测性问题
Some checks failed
构建并部署到测试环境(无 SSH) / build-and-deploy (push) Has been cancelled

- OnCardStatusChanged/Enabled/Disabled 添加 InvalidateCardCache,
  解决 Refresh API 更新 DB 后 polling 缓存仍为旧值的 bug
- AssetResolveResponse 的 enable_polling/network_status 去掉
  omitempty,解决 false/0 时字段从响应中消失的问题
- Scheduler/Initializer/PackageHandler 增加 INFO 级别日志,
  可通过日志判断轮询是否工作、处理了哪些卡
This commit is contained in:
2026-04-10 15:52:38 +08:00
parent ef8ec025bd
commit 2a7ac3f86e
6 changed files with 58 additions and 28 deletions

View File

@@ -186,6 +186,9 @@ func (s *Scheduler) processOneShard(ctx context.Context, shardID int) {
for i, e := range entries {
cardIDs[i] = formatUint(e.CardID)
}
s.logger.Info("分片出队",
zap.Int("shard_id", shardID), zap.String("task_type", taskType),
zap.Int("count", len(entries)))
s.enqueueBatch(ctx, taskType, cardIDs)
}
}