core.require_ready() should block with a timeout before raising
Closed this issue · 1 comments
progrium commented
If we can wait() on ready state, then we can make require_ready block within a timeout until ready. This makes it more useful in that you can continue to call that method without handling an exception, assuming the service will soon return to a ready state.
chadselph commented
what does this look like? A context manager? Just a regular function call?
...
core.require_ready() # blocks until ready?
core.stuff_that_requires ready()?
@core.requires_ready()
def stuff_that_required_ready():
...
with core.requires_ready():
stuff_that_well___you_know()