feat: 新增 PollingCardStatusHandler 及工具函数卡状态支持

polling_cardstatus_handler.go: 新文件,实现卡开停机状态轮询
  - Gateway QueryCardStatus → 停机/0,其他/1
  - 状态变化时写 DB + 更新缓存 + 触发 EvaluateAndAct
  - verbose log 位于 gateway 块内
polling_utils.go: getIntervalByTaskType 新增 TaskTypePollingCardStatus case

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
This commit is contained in:
2026-04-15 12:22:34 +08:00
parent 71559547b6
commit c7f486ae09
2 changed files with 129 additions and 0 deletions

View File

@@ -31,6 +31,10 @@ func getIntervalByTaskType(cfg *model.PollingConfig, taskType string) int {
if cfg.ProtectCheckInterval != nil && *cfg.ProtectCheckInterval > 0 {
return *cfg.ProtectCheckInterval
}
case constants.TaskTypePollingCardStatus:
if cfg.CardStatusCheckInterval != nil && *cfg.CardStatusCheckInterval > 0 {
return *cfg.CardStatusCheckInterval
}
}
return 0
}