bluesky_queueserver_api.zmq.REManagerAPI.queue_mode_set

REManagerAPI.queue_mode_set(**kwargs)

Set parameters that define the mode of plan queue execution. Only the parameters that are specified in the API call are changed. The parameters are set by passing kwargs with respective names or passing the dictionary of parameters using mode kwarg. Pass mode="default" to reset all parameters to the default values. Supported mode parameter: loop (default False). Current values of queue mode parameters may be found as part of RE Manager status (plan_queue_mode).

Parameters:
mode: dict or str

Pass dictionary with mode parameters that need to be changed or "default" to reset all mode parameters to default values. All other kwargs are ignored if mode kwarg is passed.

loop: boolean

Turns LOOP mode ON and OFF

ignore_failures: boolean

Tells the manager to handle failed plans as successful. If the mode is enabled, the manager proceeds to execution of the next plan in the queue even if the previous plan fails. The mode is disabled by default.

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.queue_mode_set(loop=True)
RM.queue_mode_set(mode={"loop": True})
RM.queue_mode_set(mode="default")

# Asynchronous code (0MQ, HTTP)
await RM.queue_mode_set(loop=True)
await RM.queue_mode_set(mode={"loop": True})
await RM.queue_mode_set(mode="default")