bluesky_queueserver_api.zmq.REManagerAPI.item_get¶
- REManagerAPI.item_get(*, pos=None, uid=None)¶
Load an existing queue item. Items may be addressed by position or UID. Returns the item at the back of the queue by default.
- Parameters:
- pos: str, int or None
Position of the item in the queue. The position may be positive or negative integer. If the position is negative, the items are counted from the back of the queue. If
pos
value is a string “front”` or"back"
, then the item from the front or the back of the queue is returned. If the value isNone
(default), then the position is not specified.- uid: str or None
UID of the item. If
None
(default), then the parameter are not specified.
- 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.item
: dict - a dictionary of item parameters.{}
if the operation fails.
- Raises:
- RequestTimeoutError, RequestFailedError, HTTPRequestError, HTTPClientError, HTTPServerError
All exceptions raised by
send_request
API.
Examples
# Synchronous code (0MQ, HTTP) RM.item_get() RM.item_get(pos="front") RM.item_get(pos=-2) # Asynchronous code (0MQ, HTTP) await RM.item_get() await RM.item_get(pos="front") await RM.item_get(pos=-2)