mirror of
https://github.com/hibiken/asynq.git
synced 2025-04-22 08:40:22 +08:00
Fix LastFailedAt in archived tasks
This commit is contained in:
parent
27cbee82e9
commit
60750b5c55
@ -290,6 +290,11 @@ return 1
|
||||
|
||||
// ZAddTask adds task to zset.
|
||||
func ZAddTask(c redis.UniversalClient, key string, msg *base.TaskMessage, score float64, state string) error {
|
||||
// Special case; LastFailedAt field is new so assign a value inferred from zscore.
|
||||
if state == "archived" {
|
||||
msg.LastFailedAt = int64(score)
|
||||
}
|
||||
|
||||
encoded, err := base.EncodeMessage(msg)
|
||||
if err != nil {
|
||||
return err
|
||||
|
Loading…
x
Reference in New Issue
Block a user