From 3f4f0c1daa886fb72f06621f16c5f46a80e1ab52 Mon Sep 17 00:00:00 2001 From: ashang <35057561+assimon@users.noreply.github.com> Date: Tue, 29 Mar 2022 21:30:10 +0800 Subject: [PATCH] Use explicit types for limit constants --- internal/rdb/rdb.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/internal/rdb/rdb.go b/internal/rdb/rdb.go index 864274d..b9292c9 100644 --- a/internal/rdb/rdb.go +++ b/internal/rdb/rdb.go @@ -348,7 +348,7 @@ func (r *RDB) Done(ctx context.Context, msg *base.TaskMessage) error { argv := []interface{}{ msg.ID, expireAt.Unix(), - math.MaxInt64, + int64(math.MaxInt64), } // Note: We cannot pass empty unique key when running this script in redis-cluster. if len(msg.UniqueKey) > 0 { @@ -458,7 +458,7 @@ func (r *RDB) MarkAsComplete(ctx context.Context, msg *base.TaskMessage) error { statsExpireAt.Unix(), now.Unix() + msg.Retention, encoded, - math.MaxInt64, + int64(math.MaxInt64), } // Note: We cannot pass empty unique key when running this script in redis-cluster. if len(msg.UniqueKey) > 0 { @@ -688,7 +688,7 @@ func (r *RDB) Retry(ctx context.Context, msg *base.TaskMessage, processAt time.T processAt.Unix(), expireAt.Unix(), isFailure, - math.MaxInt64, + int64(math.MaxInt64), } return r.runScript(ctx, op, retryCmd, keys, argv...) } @@ -774,7 +774,7 @@ func (r *RDB) Archive(ctx context.Context, msg *base.TaskMessage, errMsg string) cutoff.Unix(), maxArchiveSize, expireAt.Unix(), - math.MaxInt64, + int64(math.MaxInt64), } return r.runScript(ctx, op, archiveCmd, keys, argv...) }