bluesky_queueserver_api.zmq.REManagerAPI.re_runs¶
- REManagerAPI.re_runs(option=None, *, reload=False)¶
Request the list of active runs generated by the currently executed plans. The full list of active runs includes the runs that are currently open (
"option": "open"
) and the runs that were already closed ("option": "closed"
). Simple single-run plans will have at most one run in the list. Monitorrun_list_uid
RE Manager status field and retrieve the updated list once UID is changed. The UID of the retrieved list is included in the returned parameters.- Parameters:
- option: str (optional, ‘active’, ‘open’ or ‘closed’)
Select between full list of
active
(default) runs, the list ofopen
orclosed
runs.
- Returns:
- response: dict
Dictionary keys:
success
: boolean - success of the request.msg
: str - error message in case the request is rejected by RE Manager.run_list
: list(dict) - the requested list of runs. List items are dictionaries with the following keys:uid
(str),is_open
(boolean) andexit_status
(str or None). See Bluesky documentation for values of exit_status.run_list_uid
: str - run list UID.
- Raises:
- RequestTimeoutError, RequestFailedError, HTTPRequestError, HTTPClientError, HTTPServerError
All exceptions raised by
send_request
API.
Examples
function = BFunc("function_sleep", 10) # Synchronous code (0MQ, HTTP) reply = RM.re_runs() # Returns all active runs runs = reply["run_list"] reply = RM.re_runs("active") # Returns all active runs reply = RM.re_runs("open") # Returns open runs reply = RM.re_runs("closed") # Returns closed runs # Asynchronous code (0MQ, HTTP) reply = await RM.re_runs() # Returns all active runs runs = reply["run_list"] reply = await RM.re_runs("active") # Returns all active runs reply = await RM.re_runs("open") # Returns open runs reply = await RM.re_runs("closed") # Returns closed runs