From 21634d3bcb6b7a8a8ea4e0de26f85453ba78900f Mon Sep 17 00:00:00 2001 From: wakonig_k Date: Fri, 14 Nov 2025 10:41:50 +0100 Subject: [PATCH] fix: use streams to retrieve the username from redis --- ophyd_devices/utils/bec_scaninfo_mixin.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/ophyd_devices/utils/bec_scaninfo_mixin.py b/ophyd_devices/utils/bec_scaninfo_mixin.py index 4eb7402..645aa7b 100644 --- a/ophyd_devices/utils/bec_scaninfo_mixin.py +++ b/ophyd_devices/utils/bec_scaninfo_mixin.py @@ -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