From 708078c803d8247311ab189bc3f339cd25450527 Mon Sep 17 00:00:00 2001 From: Dan Buch Date: Wed, 15 Oct 2025 08:13:13 -0400 Subject: [PATCH] Remove 1s buffer from cordon range since it works so well that having the buffer actually results in early cancelation. --- queue/client.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/queue/client.go b/queue/client.go index 04a3a45..628c780 100644 --- a/queue/client.go +++ b/queue/client.go @@ -268,7 +268,7 @@ func (c *Client) CordonDeadlineExceeded(ctx context.Context, within time.Duratio pipe := c.rdb.Pipeline() zRangeOpts := &redis.ZRangeBy{ Min: strconv.Itoa(int(start.Add(-within).Unix())), - Max: strconv.Itoa(int(start.Add(1 * time.Second).Unix())), + Max: strconv.Itoa(int(start.Unix())), } zRangeCmd := c.rdb.ZRangeByScoreWithScores(