Skip to content

Commit 9f7f07f

Browse files
committed
Rename XPendingExt RetryCount to DeliveredTimes to avoid ambiguity
1 parent 00d9848 commit 9f7f07f

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

command.go

+5-5
Original file line numberDiff line numberDiff line change
@@ -1741,10 +1741,10 @@ func (cmd *XPendingCmd) readReply(rd *proto.Reader) error {
17411741
//------------------------------------------------------------------------------
17421742

17431743
type XPendingExt struct {
1744-
ID string
1745-
Consumer string
1746-
Idle time.Duration
1747-
RetryCount int64
1744+
ID string
1745+
Consumer string
1746+
Idle time.Duration
1747+
DeliveredTimes int64
17481748
}
17491749

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

1808-
if cmd.val[i].RetryCount, err = rd.ReadInt(); err != nil && err != Nil {
1808+
if cmd.val[i].DeliveredTimes, err = rd.ReadInt(); err != nil && err != Nil {
18091809
return err
18101810
}
18111811
}

commands_test.go

+3-3
Original file line numberDiff line numberDiff line change
@@ -6063,9 +6063,9 @@ var _ = Describe("Commands", func() {
60636063
infoExt[i].Idle = 0
60646064
}
60656065
Expect(infoExt).To(Equal([]redis.XPendingExt{
6066-
{ID: "1-0", Consumer: "consumer", Idle: 0, RetryCount: 1},
6067-
{ID: "2-0", Consumer: "consumer", Idle: 0, RetryCount: 1},
6068-
{ID: "3-0", Consumer: "consumer", Idle: 0, RetryCount: 1},
6066+
{ID: "1-0", Consumer: "consumer", Idle: 0, DeliveredTimes: 1},
6067+
{ID: "2-0", Consumer: "consumer", Idle: 0, DeliveredTimes: 1},
6068+
{ID: "3-0", Consumer: "consumer", Idle: 0, DeliveredTimes: 1},
60696069
}))
60706070

60716071
args.Idle = 72 * time.Hour

0 commit comments

Comments
 (0)