轮训有问题
All checks were successful
构建并部署到测试环境(无 SSH) / build-and-deploy (push) Successful in 8m7s

This commit is contained in:
2026-05-22 16:21:46 +08:00
parent 860f589b9a
commit 226474b434
3 changed files with 25 additions and 5 deletions

View File

@@ -314,10 +314,13 @@ func startPollingInitializer(ctx context.Context, runtime *workerRuntime, appLog
pollingInitializer.StartBackground(ctx)
runtime.pollingConfigMgr.WatchChanges(ctx, func(hadConfigs, hasConfigs bool) {
if !hadConfigs && hasConfigs {
appLogger.Info("轮询配置从空变为非空,触发队列重新初始化")
if hasConfigs {
appLogger.Info("轮询配置已变更,触发队列重新初始化",
zap.Bool("had_configs", hadConfigs))
pollingInitializer.Restart(ctx)
return
}
appLogger.Info("轮询配置已清空,跳过队列重新初始化")
})
return pollingInitializer