feat: 新增轮询自动触发配置(EnableAutoTrigger、AutoTriggerSystemUserID)
This commit is contained in:
@@ -24,6 +24,7 @@ type Config struct {
|
||||
DefaultAdmin DefaultAdminConfig `mapstructure:"default_admin"`
|
||||
Storage StorageConfig `mapstructure:"storage"`
|
||||
Gateway GatewayConfig `mapstructure:"gateway"`
|
||||
PollingAutoTrigger PollingAutoTriggerConfig `mapstructure:"polling_auto_trigger"`
|
||||
}
|
||||
|
||||
// ServerConfig HTTP 服务器配置
|
||||
@@ -139,6 +140,16 @@ type GatewayConfig struct {
|
||||
Timeout int `mapstructure:"timeout"` // 超时时间(秒)
|
||||
}
|
||||
|
||||
// PollingAutoTriggerConfig 轮询自动触发配置
|
||||
type PollingAutoTriggerConfig struct {
|
||||
// EnableAutoTrigger 是否启用C端实名自动触发
|
||||
// 环境变量:JUNHONG_POLLING_AUTO_TRIGGER_ENABLE_AUTO_TRIGGER
|
||||
EnableAutoTrigger bool `mapstructure:"enable_auto_trigger"`
|
||||
// AutoTriggerSystemUserID 自动触发使用的系统用户ID(暂用 SuperAdmin ID=1)
|
||||
// 环境变量:JUNHONG_POLLING_AUTO_TRIGGER_AUTO_TRIGGER_SYSTEM_USER_ID
|
||||
AutoTriggerSystemUserID int `mapstructure:"auto_trigger_system_user_id"`
|
||||
}
|
||||
|
||||
// S3Config S3 兼容存储配置
|
||||
type S3Config struct {
|
||||
Endpoint string `mapstructure:"endpoint"` // 服务端点(如:http://obs-helf.cucloud.cn)
|
||||
|
||||
@@ -116,3 +116,8 @@ gateway:
|
||||
app_secret: "BZeQttaZQt0i73moF"
|
||||
timeout: 30
|
||||
|
||||
# 轮询自动触发配置
|
||||
polling_auto_trigger:
|
||||
enable_auto_trigger: true
|
||||
auto_trigger_system_user_id: 1 # 暂用 SuperAdmin,生产环境建议创建专用平台账号并更新此值
|
||||
|
||||
|
||||
Reference in New Issue
Block a user