修复配置更新任务解析失败问题

This commit is contained in:
2025-12-03 15:04:48 +08:00
parent e1e499c19b
commit caa997b95c
3 changed files with 28 additions and 11 deletions

View File

@@ -1,9 +1,13 @@
package events
import "github.com/hibiken/asynq"
import (
"time"
"github.com/hibiken/asynq"
)
const FlushGateway = "gateway:flush"
func NewFlushGateway() *asynq.Task {
return asynq.NewTask(FlushGateway, nil)
func NewFlushGateway(ttl time.Duration) *asynq.Task {
return asynq.NewTask(FlushGateway, nil, asynq.MaxRetry(0), asynq.Unique(ttl))
}