mirror of
https://github.com/hibiken/asynq.git
synced 2025-04-22 00:30:17 +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
|
// Redis keys
|
||||||
const (
|
const (
|
||||||
processedPrefix = "asynq:processed:" // STRING - asynq:processed:<yyyy-mm-dd>
|
processedPrefix = "asynq:processed:" // STRING - asynq:processed:<yyyy-mm-dd>
|
||||||
failurePrefix = "asynq:failure:" // STRING - asynq:failure:<yyyy-mm-dd>
|
failurePrefix = "asynq:failure:" // STRING - asynq:failure:<yyyy-mm-dd>
|
||||||
queuePrefix = "asynq:queues:" // LIST - asynq:queues:<qname>
|
queuePrefix = "asynq:queues:" // LIST - asynq:queues:<qname>
|
||||||
DefaultQueue = queuePrefix + "default" // LIST
|
DefaultQueue = queuePrefix + "default" // LIST
|
||||||
ScheduledQueue = "asynq:scheduled" // ZSET
|
HighPriorityQueue = queuePrefix + "high" // LIST
|
||||||
RetryQueue = "asynq:retry" // ZSET
|
LowPriorityQueue = queuePrefix + "low" // LIST
|
||||||
DeadQueue = "asynq:dead" // ZSET
|
ScheduledQueue = "asynq:scheduled" // ZSET
|
||||||
InProgressQueue = "asynq:in_progress" // LIST
|
RetryQueue = "asynq:retry" // ZSET
|
||||||
|
DeadQueue = "asynq:dead" // ZSET
|
||||||
|
InProgressQueue = "asynq:in_progress" // LIST
|
||||||
)
|
)
|
||||||
|
|
||||||
// Priority indicates importance of a task in comparison with others.
|
// Priority indicates importance of a task in comparison with others.
|
||||||
|
@ -10,9 +10,9 @@ func TestQueueKey(t *testing.T) {
|
|||||||
p Priority
|
p Priority
|
||||||
want string
|
want string
|
||||||
}{
|
}{
|
||||||
{PriorityHigh, "asynq:queues:high"},
|
{PriorityHigh, HighPriorityQueue},
|
||||||
{PriorityDefault, "asynq:queues:default"},
|
{PriorityDefault, DefaultQueue},
|
||||||
{PriorityLow, "asynq:queues:low"},
|
{PriorityLow, LowPriorityQueue},
|
||||||
}
|
}
|
||||||
|
|
||||||
for _, tc := range tests {
|
for _, tc := range tests {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user