We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 47e8af8 commit e71f8e4Copy full SHA for e71f8e4
1 file changed
storage/internal/queue.go
@@ -59,6 +59,9 @@ func NewQueue(ctx context.Context, maxAge time.Duration, maxSize uint, f FlushFu
59
defer close(batches)
60
61
var items []queueItem
62
+
63
+ // Initialise a timer with an arbitrarily large value, and immediately
64
+ // call Stop() to avoid a spurious trigger on the first iteration.
65
timer := time.NewTimer(time.Hour)
66
timer.Stop()
67
0 commit comments