Skip to content

Commit 5f85c69

Browse files
authored
Remove 1s buffer from cordon range (#226)
since it works so well that having the buffer actually results in early cancelation.
1 parent e8996c9 commit 5f85c69

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

queue/client.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -268,7 +268,7 @@ func (c *Client) CordonDeadlineExceeded(ctx context.Context, within time.Duratio
268268
pipe := c.rdb.Pipeline()
269269
zRangeOpts := &redis.ZRangeBy{
270270
Min: strconv.Itoa(int(start.Add(-within).Unix())),
271-
Max: strconv.Itoa(int(start.Add(1 * time.Second).Unix())),
271+
Max: strconv.Itoa(int(start.Unix())),
272272
}
273273

274274
zRangeCmd := c.rdb.ZRangeByScoreWithScores(

0 commit comments

Comments
 (0)