Compare commits

...

2 Commits

Author SHA1 Message Date
Sangriot 2b2640e849
Merge 9f7f07f8b9 into 930d904205 2024-11-15 14:24:49 +08:00
sang 9f7f07f8b9 Rename XPendingExt RetryCount to DeliveredTimes to avoid ambiguity 2024-08-08 14:59:00 +08:00
2 changed files with 8 additions and 8 deletions

View File

@ -1782,10 +1782,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 {
@ -1846,7 +1846,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
}
}

View File

@ -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