thanos icon indicating copy to clipboard operation
thanos copied to clipboard

Expose async queue method

Open yeya24 opened this issue 1 year ago • 4 comments

  • [ ] 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

yeya24 avatar Dec 01 '23 04:12 yeya24

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 avatar Dec 04 '23 16:12 fpetkovski

@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.

yeya24 avatar Dec 04 '23 18:12 yeya24

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 avatar Dec 04 '23 20:12 yeya24

@yeya24 do you still want this merged?

GiedriusS avatar Jan 23 '24 11:01 GiedriusS