mirror of
https://github.com/hibiken/asynq.git
synced 2025-10-03 05:12:01 +08:00
Change RDB.Dequeue to query multiple queues
This commit is contained in:
@@ -108,10 +108,16 @@ func FlushDB(tb testing.TB, r *redis.Client) {
|
||||
}
|
||||
}
|
||||
|
||||
// SeedDefaultQueue initializes the default queue with the given messages.
|
||||
func SeedDefaultQueue(tb testing.TB, r *redis.Client, msgs []*base.TaskMessage) {
|
||||
// SeedEnqueuedQueue initializes the specified queue with the given messages.
|
||||
//
|
||||
// If queue name option is not passed, it defaults to the default queue.
|
||||
func SeedEnqueuedQueue(tb testing.TB, r *redis.Client, msgs []*base.TaskMessage, queueOpt ...string) {
|
||||
tb.Helper()
|
||||
seedRedisList(tb, r, base.DefaultQueue, msgs)
|
||||
queue := base.DefaultQueue
|
||||
if len(queueOpt) > 0 {
|
||||
queue = base.QueueKey(queueOpt[0])
|
||||
}
|
||||
seedRedisList(tb, r, queue, msgs)
|
||||
}
|
||||
|
||||
// SeedInProgressQueue initializes the in-progress queue with the given messages.
|
||||
|
Reference in New Issue
Block a user