Monitor specific queue for long wait if configured #1174
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This is a proposed solution for #1171 to monitor a specific queue if configured.
Currently, when running multiple queues an event is emitted for that "shared" queue. So there's no way to be notified when a specific queue within a "shared" queue has a long wait.
This PR allows you to receive an event for a specific queue, even if running within a multiple queue, when configured via
waits
.For example:
In an effort to be backwards compatible, I did not change the underlying
WaitTimeCalculator
. Instead, I isolated the change to the listener. It now also monitors any queues configured viawaits
. This actually provides more flexibility as you may now monitor individual and multiple queues, but potentially combinations of queues which may not run under the same supervisor (would need more testing).Combined with #1172, I hope this makes the
waits
configuration more robust for developers needs.