mirror of
https://github.com/hibiken/asynq.git
synced 2025-10-20 21:26:14 +08:00
Add task message to deadlines set on dequeue
Updated dequeueCmd to decode the message and compute its deadline and add the message to the Deadline set.
This commit is contained in:
@@ -259,6 +259,12 @@ func GetDeadEntries(tb testing.TB, r *redis.Client) []ZSetEntry {
|
||||
return getZSetEntries(tb, r, base.DeadQueue)
|
||||
}
|
||||
|
||||
// GetDeadlinesEntries returns all task messages and its score in the deadlines set.
|
||||
func GetDeadlinesEntries(tb testing.TB, r *redis.Client) []ZSetEntry {
|
||||
tb.Helper()
|
||||
return getZSetEntries(tb, r, base.KeyDeadlines)
|
||||
}
|
||||
|
||||
func getListMessages(tb testing.TB, r *redis.Client, list string) []*base.TaskMessage {
|
||||
data := r.LRange(list, 0, -1).Val()
|
||||
return MustUnmarshalSlice(tb, data)
|
||||
|
Reference in New Issue
Block a user