修复配置更新任务解析失败问题
This commit is contained in:
@@ -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))
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user