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.
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 variousWorkerHelper.wait_for_dispatched_*
methods and treating a value ofNone
(the default) as an indication that we should wait for pending deliveries to finish instead of waiting for a particular number of messages.