This commit is contained in:
2025-09-03 10:55:30 +02:00
parent 93e5363c7e
commit 4db98bd15f

View File

@@ -69,7 +69,7 @@ class AndStatus(StatusBase):
for st in self.all_statuses:
with st._lock:
if st.done and not st.success:
self.set_exception(st.exception())
self.set_exception(st.exception()) # st._exception
return
if all(st.done for st in self.all_statuses) and all(
@@ -97,13 +97,16 @@ class AndStatus(StatusBase):
return False
def set_exception(self, exc):
super().set_exception(exc)
for st in self.all_statuses:
with st._lock:
st.set_exception(
RuntimeError(f"AndStatus exception on high-level status, caused by {exc}")
)
# def set_exception(self, exc):
# with self._lock:
# super().set_exception(exc)
# for st in self.all_statuses:
# with st._lock:
# #TODO consider removing
# if not st.done:
# st.set_exception(
# RuntimeError(f"AndStatus exception on high-level status, caused by {exc}")
# )
def _run_callbacks(self):
"""
@@ -568,7 +571,7 @@ class Timepix(PSIDeviceBase, TimePixControl):
self.backend.timepix_fly_client.add_status_callback(
status_backend_collect_started,
success=[TimePixFlyStatus.COLLECT],
error=[TimePixFlyStatus.EXCEPT, TimePixFlyStatus.SHUTDOWN, TimePixFlyStatus.CONFIG],
error=[TimePixFlyStatus.EXCEPT, TimePixFlyStatus.SHUTDOWN],
)
# Start on trigger on backend