mirror of
https://github.com/bec-project/ophyd_devices.git
synced 2025-07-10 18:51:53 +02:00
refactor: cleanup of scan_status prints in scaninfo_mixin
This commit is contained in:
@ -166,7 +166,7 @@ class SimPositioner(Device, PositionerBase):
|
|||||||
ttime.sleep(1 / self.update_frequency)
|
ttime.sleep(1 / self.update_frequency)
|
||||||
self._update_state(ii)
|
self._update_state(ii)
|
||||||
if self._stopped:
|
if self._stopped:
|
||||||
raise DeviceStopError(f"{self.parent.name} was stopped")
|
raise DeviceStopError(f"{self.name} was stopped")
|
||||||
st.set_finished()
|
st.set_finished()
|
||||||
# pylint: disable=broad-except
|
# pylint: disable=broad-except
|
||||||
except Exception as exc:
|
except Exception as exc:
|
||||||
@ -241,7 +241,7 @@ class SimLinearTrajectoryPositioner(SimPositioner):
|
|||||||
while not traj.ended:
|
while not traj.ended:
|
||||||
ttime.sleep(1 / self.update_frequency)
|
ttime.sleep(1 / self.update_frequency)
|
||||||
self._update_state(traj.position())
|
self._update_state(traj.position())
|
||||||
raise DeviceStopError(f"{self.parent.name} was stopped")
|
raise DeviceStopError(f"{self.name} was stopped")
|
||||||
st.set_finished()
|
st.set_finished()
|
||||||
# pylint: disable=broad-except
|
# pylint: disable=broad-except
|
||||||
except Exception as exc:
|
except Exception as exc:
|
||||||
|
@ -122,8 +122,8 @@ class BecScaninfoMixin:
|
|||||||
This function loads scan metadata from the current scan message
|
This function loads scan metadata from the current scan message
|
||||||
"""
|
"""
|
||||||
self.scan_msg = scan_msg = self._get_current_scan_msg()
|
self.scan_msg = scan_msg = self._get_current_scan_msg()
|
||||||
logger.info(f"{self.scan_msg}")
|
|
||||||
try:
|
try:
|
||||||
|
logger.info(f"Received scan msg for {self.scan_msg.content['scan_id']}")
|
||||||
self.metadata = {
|
self.metadata = {
|
||||||
"scan_id": scan_msg.content["scan_id"],
|
"scan_id": scan_msg.content["scan_id"],
|
||||||
"RID": scan_msg.content["info"]["RID"],
|
"RID": scan_msg.content["info"]["RID"],
|
||||||
|
Reference in New Issue
Block a user