thanos
thanos copied to clipboard
Expose async queue method
- [ ] I added CHANGELOG entry for this change.
- [x] Change is not relevant to the end user.
Changes
Exposes the async queue so that in unit tests I can drain it to make sure all items in the queue are processed
Verification
Maybe we could drain the queue in the Stop
method? This way we don't need to expose a method for the sake of testing.
@fpetkovski My usecase is to make sure the items in the queue are consumed, not just drained... I feel like it is something that is outside of the Stop
method.
I am also wondering why the async queue is never closed even when we stop the queue. https://github.com/thanos-io/thanos/pull/6946/files#diff-c31aaadfff8004fc92e97126b0bb221b72cf66e1bb5036cdd25c75614979e03fR42
Can I close the async queue in Stop
method?
@yeya24 do you still want this merged?