bluesky_queueserver_api.zmq.REManagerAPI.wait_for_condition

REManagerAPI.wait_for_condition(condition, *, timeout=600, monitor=None)

The function periodically checks RE Manager status and blocks until the condition callable returns True and can be used to wait for arbitrary conditions based on RE Manager status and/or user-provided data. The function is raises WaitTimeoutError if timeout occurs. The timeout can not be infinite, but may be set to a large value if necessary.

Parameters:
condition: callable

Condition is a function (any callable), which is waiting for the returned status to satisfy certain fixed set of conditions. For example, the function which waits for the manager status to become idle:

def condition(status):
    return (status["manager_state"] == "idle")
timeout: float

timeout in seconds

monitor: WaitMonitor or None

Reference to wait monitor