bluesky_queueserver_api.zmq.REManagerAPI.get_default_lock_key¶
- REManagerAPI.get_default_lock_key(new_key=False)¶
Returns the default lock key. The key is stored in a file
.config/qserver/default_lock_key.txt
. The key is load from disk each time the method is called. If the key (the file) does not exist or the method parameternew_key
isTrue
, then the new key is generated and saved to file. A specific default key may be manually set and saved to file usingset_default_lock_key()
API.The default lock key is used for storage of the key so that it could be reused between sessions. The default key is not used directly by other API. Typically the initialization script for the session should initialize the current lock key with the default lock key:
RM.lock_key = RM.get_default_lock_key()
- Parameters:
- new_key: boolean
Set this parameter
True
to generate a new default lock key.
- Returns:
- str
The default lock key.