Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions command.go
Original file line number Diff line number Diff line change
Expand Up @@ -1741,10 +1741,10 @@ func (cmd *XPendingCmd) readReply(rd *proto.Reader) error {
//------------------------------------------------------------------------------

type XPendingExt struct {
ID string
Consumer string
Idle time.Duration
RetryCount int64
ID string
Consumer string
Idle time.Duration
DeliveredTimes int64
}

type XPendingExtCmd struct {
Expand Down Expand Up @@ -1805,7 +1805,7 @@ func (cmd *XPendingExtCmd) readReply(rd *proto.Reader) error {
}
cmd.val[i].Idle = time.Duration(idle) * time.Millisecond

if cmd.val[i].RetryCount, err = rd.ReadInt(); err != nil && err != Nil {
if cmd.val[i].DeliveredTimes, err = rd.ReadInt(); err != nil && err != Nil {
return err
}
}
Expand Down
6 changes: 3 additions & 3 deletions commands_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -6063,9 +6063,9 @@ var _ = Describe("Commands", func() {
infoExt[i].Idle = 0
}
Expect(infoExt).To(Equal([]redis.XPendingExt{
{ID: "1-0", Consumer: "consumer", Idle: 0, RetryCount: 1},
{ID: "2-0", Consumer: "consumer", Idle: 0, RetryCount: 1},
{ID: "3-0", Consumer: "consumer", Idle: 0, RetryCount: 1},
{ID: "1-0", Consumer: "consumer", Idle: 0, DeliveredTimes: 1},
{ID: "2-0", Consumer: "consumer", Idle: 0, DeliveredTimes: 1},
{ID: "3-0", Consumer: "consumer", Idle: 0, DeliveredTimes: 1},
}))

args.Idle = 72 * time.Hour
Expand Down
Loading