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:
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user