2
0
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:
Ken Hibino 2020-01-01 12:12:49 -08:00
parent 2e95166f39
commit eb191c07d1
2 changed files with 13 additions and 11 deletions

View File

@ -13,6 +13,8 @@ const (
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
HighPriorityQueue = queuePrefix + "high" // LIST
LowPriorityQueue = queuePrefix + "low" // LIST
ScheduledQueue = "asynq:scheduled" // ZSET ScheduledQueue = "asynq:scheduled" // ZSET
RetryQueue = "asynq:retry" // ZSET RetryQueue = "asynq:retry" // ZSET
DeadQueue = "asynq:dead" // ZSET DeadQueue = "asynq:dead" // ZSET

View File

@ -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 {