optimize-queue #4

Merged
sinhluu merged 3 commits from optimize-queue into master 2024-07-08 09:42:36 +00:00
1 changed files with 3 additions and 1 deletions
Showing only changes of commit ae421219cb - Show all commits

View File

@ -1,8 +1,9 @@
package queue package queue
import ( import (
"github.com/hibiken/asynq"
"time" "time"
"github.com/hibiken/asynq"
) )
const ( const (
@ -19,6 +20,7 @@ func (i Instance) RunTask(typename string, payload []byte, priority string, retr
if priority != PriorityCritical && priority != PriorityDefault && priority != PriorityLow { if priority != PriorityCritical && priority != PriorityDefault && priority != PriorityLow {
priority = PriorityDefault priority = PriorityDefault
} }
priority = i.Config.QueuePrefix + priority
options = append(options, asynq.Queue(priority)) options = append(options, asynq.Queue(priority))
// Retry times // Retry times