mirror of
https://github.com/hibiken/asynq.git
synced 2024-12-27 00:02:19 +08:00
Use explicit types for limit constants
This commit is contained in:
parent
f94a65dc9f
commit
3f4f0c1daa
@ -348,7 +348,7 @@ func (r *RDB) Done(ctx context.Context, msg *base.TaskMessage) error {
|
|||||||
argv := []interface{}{
|
argv := []interface{}{
|
||||||
msg.ID,
|
msg.ID,
|
||||||
expireAt.Unix(),
|
expireAt.Unix(),
|
||||||
math.MaxInt64,
|
int64(math.MaxInt64),
|
||||||
}
|
}
|
||||||
// Note: We cannot pass empty unique key when running this script in redis-cluster.
|
// Note: We cannot pass empty unique key when running this script in redis-cluster.
|
||||||
if len(msg.UniqueKey) > 0 {
|
if len(msg.UniqueKey) > 0 {
|
||||||
@ -458,7 +458,7 @@ func (r *RDB) MarkAsComplete(ctx context.Context, msg *base.TaskMessage) error {
|
|||||||
statsExpireAt.Unix(),
|
statsExpireAt.Unix(),
|
||||||
now.Unix() + msg.Retention,
|
now.Unix() + msg.Retention,
|
||||||
encoded,
|
encoded,
|
||||||
math.MaxInt64,
|
int64(math.MaxInt64),
|
||||||
}
|
}
|
||||||
// Note: We cannot pass empty unique key when running this script in redis-cluster.
|
// Note: We cannot pass empty unique key when running this script in redis-cluster.
|
||||||
if len(msg.UniqueKey) > 0 {
|
if len(msg.UniqueKey) > 0 {
|
||||||
@ -688,7 +688,7 @@ func (r *RDB) Retry(ctx context.Context, msg *base.TaskMessage, processAt time.T
|
|||||||
processAt.Unix(),
|
processAt.Unix(),
|
||||||
expireAt.Unix(),
|
expireAt.Unix(),
|
||||||
isFailure,
|
isFailure,
|
||||||
math.MaxInt64,
|
int64(math.MaxInt64),
|
||||||
}
|
}
|
||||||
return r.runScript(ctx, op, retryCmd, keys, argv...)
|
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(),
|
cutoff.Unix(),
|
||||||
maxArchiveSize,
|
maxArchiveSize,
|
||||||
expireAt.Unix(),
|
expireAt.Unix(),
|
||||||
math.MaxInt64,
|
int64(math.MaxInt64),
|
||||||
}
|
}
|
||||||
return r.runScript(ctx, op, archiveCmd, keys, argv...)
|
return r.runScript(ctx, op, archiveCmd, keys, argv...)
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user