bluesky_queueserver_api.zmq.REManagerAPI.environment_close
- REManagerAPI.environment_close(*, lock_key=None)
Close RE Worker environment. The API request only initiates the operation of closing an environment. The request fails if a plans or foreground task is running. If the request is accepted, the
manager_statestatus parameter is expected to change toclosing_environmentand then back toidlewhen the operation is completed. Checkworker_environment_existsstatus flag to see if the environment was closed.- Parameters:
- lock_key: str or None (optional)
The lock key enables access to the API when RE Manager environment is locked. If the parameter is not
None, the key overrides the current lock key set byREManagerAPI.lock_key. See documentation onREMangerAPI.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_requestAPI.
Examples
# Synchronous code (0MQ, HTTP) RM.environment_close() # Asynchronous code (0MQ, HTTP) await RM.environment_close()