mirror of
https://github.com/hibiken/asynq.git
synced 2025-04-21 16:20:18 +08:00
Export (High|Low)PriorityQueue constant from base pkg
This commit is contained in:
parent
2e95166f39
commit
eb191c07d1
@ -9,14 +9,16 @@ import (
|
||||
|
||||
// Redis keys
|
||||
const (
|
||||
processedPrefix = "asynq:processed:" // STRING - asynq:processed:<yyyy-mm-dd>
|
||||
failurePrefix = "asynq:failure:" // STRING - asynq:failure:<yyyy-mm-dd>
|
||||
queuePrefix = "asynq:queues:" // LIST - asynq:queues:<qname>
|
||||
DefaultQueue = queuePrefix + "default" // LIST
|
||||
ScheduledQueue = "asynq:scheduled" // ZSET
|
||||
RetryQueue = "asynq:retry" // ZSET
|
||||
DeadQueue = "asynq:dead" // ZSET
|
||||
InProgressQueue = "asynq:in_progress" // LIST
|
||||
processedPrefix = "asynq:processed:" // STRING - asynq:processed:<yyyy-mm-dd>
|
||||
failurePrefix = "asynq:failure:" // STRING - asynq:failure:<yyyy-mm-dd>
|
||||
queuePrefix = "asynq:queues:" // LIST - asynq:queues:<qname>
|
||||
DefaultQueue = queuePrefix + "default" // LIST
|
||||
HighPriorityQueue = queuePrefix + "high" // LIST
|
||||
LowPriorityQueue = queuePrefix + "low" // LIST
|
||||
ScheduledQueue = "asynq:scheduled" // ZSET
|
||||
RetryQueue = "asynq:retry" // ZSET
|
||||
DeadQueue = "asynq:dead" // ZSET
|
||||
InProgressQueue = "asynq:in_progress" // LIST
|
||||
)
|
||||
|
||||
// Priority indicates importance of a task in comparison with others.
|
||||
|
@ -10,9 +10,9 @@ func TestQueueKey(t *testing.T) {
|
||||
p Priority
|
||||
want string
|
||||
}{
|
||||
{PriorityHigh, "asynq:queues:high"},
|
||||
{PriorityDefault, "asynq:queues:default"},
|
||||
{PriorityLow, "asynq:queues:low"},
|
||||
{PriorityHigh, HighPriorityQueue},
|
||||
{PriorityDefault, DefaultQueue},
|
||||
{PriorityLow, LowPriorityQueue},
|
||||
}
|
||||
|
||||
for _, tc := range tests {
|
||||
|
Loading…
x
Reference in New Issue
Block a user