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:
@@ -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端实名自动触发
|
||||
|
||||
@@ -116,6 +116,10 @@ gateway:
|
||||
app_secret: "BZeQttaZQt0i73moF"
|
||||
timeout: 30
|
||||
|
||||
# 轮询配置
|
||||
polling:
|
||||
verbose_log: false # 是否开启详细日志(环境变量:JUNHONG_POLLING_VERBOSE_LOG)
|
||||
|
||||
# 轮询自动触发配置
|
||||
polling_auto_trigger:
|
||||
enable_auto_trigger: true
|
||||
|
||||
Reference in New Issue
Block a user