mirror of
https://github.com/bec-project/ophyd_devices.git
synced 2026-02-03 05:58:38 +01:00
fix: use streams to retrieve the username from redis
This commit is contained in:
@@ -111,10 +111,10 @@ class BecScaninfoMixin:
|
||||
if self.sim_mode:
|
||||
return getpass.getuser()
|
||||
|
||||
msg = self.device_manager.connector.get(MessageEndpoints.account())
|
||||
if msg:
|
||||
return msg
|
||||
return getpass.getuser()
|
||||
msg = self.device_manager.connector.get_last(MessageEndpoints.account(), "data")
|
||||
if msg is None:
|
||||
return getpass.getuser()
|
||||
return msg.value if isinstance(msg.value, str) else getpass.getuser()
|
||||
|
||||
def load_scan_metadata(self) -> None:
|
||||
"""Load scan metadata
|
||||
|
||||
Reference in New Issue
Block a user