bluesky_queueserver_api.zmq.REManagerAPI.history_clear

REManagerAPI.history_clear(*, size=None, item_uid=None, lock_key=None)

Remove all items from the history.

Parameters:
size: int (optional)

The new size of the history. If the size is 0 or less, then the history is cleared. If the size is greater than or equal to size of the queue, then the queue is not modified and plan_history_uid remains unchanged. Otherwise the history is trimmed to the desired size. Default: None.

item_uid: str (optional)

If the history contains an item with item_uid, then the history is trimmed by removing this item and all older items. If the item with item_uid is not found then the history and plan_history_uid remain unchanged. Default: None.

lock_key: str or None (optional)

The lock key enables access to the API when RE Manager queue is locked. If the parameter is not None, the key overrides the current lock key set by REManagerAPI.lock_key. See documentation on REMangerAPI.lock() for more information. Default: None.

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.

Raises:
RequestTimeoutError, RequestFailedError, HTTPRequestError, HTTPClientError, HTTPServerError

All exceptions raised by send_request API.

Examples

# Synchronous code (0MQ, HTTP)
RM.history_clear()

# Asynchronous code (0MQ, HTTP)
await RM.history_clear()