1
0
mirror of https://github.com/redis/go-redis.git synced 2025-07-18 00:20:57 +03:00

Added missing idle args in XPendingExtArgs (#1750)

Added missing idle args in XPendingExtArgs
This commit is contained in:
Parvez
2021-05-13 20:45:37 +05:30
committed by GitHub
parent 44f5c06755
commit 31495ac570
2 changed files with 15 additions and 5 deletions

View File

@ -1811,6 +1811,7 @@ func (c cmdable) XPending(ctx context.Context, stream, group string) *XPendingCm
type XPendingExtArgs struct {
Stream string
Group string
Idle time.Duration
Start string
End string
Count int64
@ -1818,8 +1819,12 @@ type XPendingExtArgs struct {
}
func (c cmdable) XPendingExt(ctx context.Context, a *XPendingExtArgs) *XPendingExtCmd {
args := make([]interface{}, 0, 7)
args = append(args, "xpending", a.Stream, a.Group, a.Start, a.End, a.Count)
args := make([]interface{}, 0, 9)
args = append(args, "xpending", a.Stream, a.Group)
if a.Idle != 0 {
args = append(args, "idle", formatMs(ctx, a.Idle))
}
args = append(args, a.Start, a.End, a.Count)
if a.Consumer != "" {
args = append(args, a.Consumer)
}