feat: update queue config - support prefix to prevent conflict
This commit is contained in:
parent
e28d02b0cb
commit
ae421219cb
4
task.go
4
task.go
|
@ -1,8 +1,9 @@
|
|||
package queue
|
||||
|
||||
import (
|
||||
"github.com/hibiken/asynq"
|
||||
"time"
|
||||
|
||||
"github.com/hibiken/asynq"
|
||||
)
|
||||
|
||||
const (
|
||||
|
@ -19,6 +20,7 @@ func (i Instance) RunTask(typename string, payload []byte, priority string, retr
|
|||
if priority != PriorityCritical && priority != PriorityDefault && priority != PriorityLow {
|
||||
priority = PriorityDefault
|
||||
}
|
||||
priority = i.Config.QueuePrefix + priority
|
||||
options = append(options, asynq.Queue(priority))
|
||||
|
||||
// Retry times
|
||||
|
|
Loading…
Reference in New Issue