refactor: cleanup of scan_status prints in scaninfo_mixin

This commit is contained in:
2024-10-01 13:53:04 +02:00
parent 7ff37c0dcd
commit 449dadb593
2 changed files with 3 additions and 3 deletions

View File

@ -166,7 +166,7 @@ class SimPositioner(Device, PositionerBase):
ttime.sleep(1 / self.update_frequency)
self._update_state(ii)
if self._stopped:
raise DeviceStopError(f"{self.parent.name} was stopped")
raise DeviceStopError(f"{self.name} was stopped")
st.set_finished()
# pylint: disable=broad-except
except Exception as exc:
@ -241,7 +241,7 @@ class SimLinearTrajectoryPositioner(SimPositioner):
while not traj.ended:
ttime.sleep(1 / self.update_frequency)
self._update_state(traj.position())
raise DeviceStopError(f"{self.parent.name} was stopped")
raise DeviceStopError(f"{self.name} was stopped")
st.set_finished()
# pylint: disable=broad-except
except Exception as exc:

View File

@ -122,8 +122,8 @@ class BecScaninfoMixin:
This function loads scan metadata from the current scan message
"""
self.scan_msg = scan_msg = self._get_current_scan_msg()
logger.info(f"{self.scan_msg}")
try:
logger.info(f"Received scan msg for {self.scan_msg.content['scan_id']}")
self.metadata = {
"scan_id": scan_msg.content["scan_id"],
"RID": scan_msg.content["info"]["RID"],