bluesky_queueserver_api.zmq.REManagerAPI.queue_get

REManagerAPI.queue_get(*, reload=False)

Returns the list of items (plans and instructions) in the plan queue and currently running plan. The function checks plan_queue_uid status parameter and downloads the queue from the server if UID changed. Otherwise the copy of cached queue is returned.

Parameters:
reload: boolean (optional)

Set the parameter True to force reloading of status from the server before plan_queue_uid is checked. Otherwise cached status is used.

Returns:
response: dict

Dictionary keys:

  • success: boolean - success of the request.

  • msg: str - error message in case the request is rejected by RE Manager or operation failed.

  • items: list(dict) - list of dictionaries containing queue item parameters.

  • running_item: dict - dictionary with parameters of currently running plan, {} if the queue is not running),

  • plan_queue_uid: str - UID of the plan queue

Raises:
RequestTimeoutError, RequestFailedError, HTTPRequestError, HTTPClientError, HTTPServerError

All exceptions raised by send_request API.

Examples

# Synchronous code (0MQ, HTTP)
response = RM.queue_get()
queue_items = response["items"]
running_item = response["running_item"]
queue_uid = response["plan_queue_uid"]

# Asynchronous code (0MQ, HTTP)
response = await RM.queue_get()
queue_items = response["items"]
running_item = response["running_item"]
queue_uid = response["plan_queue_uid"]