2
0
mirror of https://github.com/hibiken/asynq.git synced 2025-08-19 15:08:55 +08:00

Use math.MaxInt64 instead of custom const

This commit is contained in:
Ken Hibino
2021-12-19 06:58:12 -08:00
parent 82d18e3d91
commit 1ddb2f7bce
2 changed files with 5 additions and 10 deletions

View File

@@ -8,6 +8,7 @@ package rdb
import (
"context"
"fmt"
"math"
"time"
"github.com/go-redis/redis/v8"
@@ -382,7 +383,7 @@ func (r *RDB) Done(msg *base.TaskMessage) error {
argv := []interface{}{
msg.ID,
expireAt.Unix(),
base.MaxInt64,
math.MaxInt64,
}
// Note: We cannot pass empty unique key when running this script in redis-cluster.
if len(msg.UniqueKey) > 0 {
@@ -493,7 +494,7 @@ func (r *RDB) MarkAsComplete(msg *base.TaskMessage) error {
statsExpireAt.Unix(),
now.Unix() + msg.Retention,
encoded,
base.MaxInt64,
math.MaxInt64,
}
// Note: We cannot pass empty unique key when running this script in redis-cluster.
if len(msg.UniqueKey) > 0 {
@@ -735,7 +736,7 @@ func (r *RDB) Retry(msg *base.TaskMessage, processAt time.Time, errMsg string, i
processAt.Unix(),
expireAt.Unix(),
isFailure,
base.MaxInt64,
math.MaxInt64,
}
return r.runScript(ctx, op, retryCmd, keys, argv...)
}
@@ -822,7 +823,7 @@ func (r *RDB) Archive(msg *base.TaskMessage, errMsg string) error {
cutoff.Unix(),
maxArchiveSize,
expireAt.Unix(),
base.MaxInt64,
math.MaxInt64,
}
return r.runScript(ctx, op, archiveCmd, keys, argv...)
}