feat: 新增卡状态轮询任务类型常量及 verbose_log 配置

constants.go: 新增 TaskTypePollingCardStatus = "polling:card_status"
config.go: 新增 PollingConfig struct 含 VerboseLog bool
config.yaml: polling.verbose_log 默认 false

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:21:43 +08:00
parent e2003eb9e3
commit 9992e82a3c
3 changed files with 17 additions and 4 deletions

View File

@@ -25,6 +25,7 @@ type Config struct {
Storage StorageConfig `mapstructure:"storage"`
Gateway GatewayConfig `mapstructure:"gateway"`
PollingAutoTrigger PollingAutoTriggerConfig `mapstructure:"polling_auto_trigger"`
Polling PollingConfig `mapstructure:"polling"`
}
// ServerConfig HTTP 服务器配置
@@ -140,6 +141,13 @@ type GatewayConfig struct {
Timeout int `mapstructure:"timeout"` // 超时时间(秒)
}
// PollingConfig 轮询通用配置
type PollingConfig struct {
// VerboseLog 开启后,所有轮询 handler 在成功获取上游数据时以 Info 级别输出详细日志
// 环境变量JUNHONG_POLLING_VERBOSE_LOG
VerboseLog bool `mapstructure:"verbose_log"`
}
// PollingAutoTriggerConfig 轮询自动触发配置
type PollingAutoTriggerConfig struct {
// EnableAutoTrigger 是否启用C端实名自动触发