Skip to content

WorkerHelper should support getting messages after pending deliveries#1008

Merged
jerith merged 4 commits intodevelopfrom
feature/issue-1008-wait-for-messages
Nov 6, 2015
Merged

WorkerHelper should support getting messages after pending deliveries#1008
jerith merged 4 commits intodevelopfrom
feature/issue-1008-wait-for-messages

Conversation

@jerith
Copy link
Member

@jerith jerith commented Nov 5, 2015

At the moment, we can either get current messages or wait for a specific number of messages. It would be useful to be able to wait for any pending deliveries to complete and then get whatever messages are available. (This is particularly helpful for #1000, which breaks the assumption that the client can wait for the broker to receive published messages.)

In order to maintain compatibility while avoiding API bloat, I'm making the amount parameter optional in the various WorkerHelper.wait_for_dispatched_* methods and treating a value of None (the default) as an indication that we should wait for pending deliveries to finish instead of waiting for a particular number of messages.

@jerith jerith self-assigned this Nov 5, 2015
@jerith
Copy link
Member Author

jerith commented Nov 5, 2015

The core change is done, but I also want to update a bunch of tests to use the new functionality as part of this PR.

@smn
Copy link
Member

smn commented Nov 5, 2015

👍

@jerith jerith merged commit b6c6a00 into develop Nov 6, 2015
@jerith jerith deleted the feature/issue-1008-wait-for-messages branch November 6, 2015 10:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants