Made that errors are now forwarded through the chain of managers to be raised in the activity creation step ultimately - a first explicit example is a failure in get_allocation.
Made .stop() methods to be able to be called multiple times, as from now we have a case for stopping the manager when its background loop was already stopped due to a previously propagated error.
Optimized time needed to raise a propagated error in the buffers, by making Buffer.wait_for_any_items() raise errors set by set_exception, so get_requested() will raise the given error instantly and will not wait to its debounce time.
Made a few tweaks for RefreshingDemandManager loop.
Updated the test cases
Notable remarks:
To test get_allocation failures, just give total_budget in yaml a big number like 1000+
What I've done:
get_allocation
..stop()
methods to be able to be called multiple times, as from now we have a case for stopping the manager when its background loop was already stopped due to a previously propagated error.Buffer.wait_for_any_items()
raise errors set byset_exception
, soget_requested()
will raise the given error instantly and will not wait to its debounce time.Notable remarks:
get_allocation
failures, just givetotal_budget
in yaml a big number like 1000+