This commit is contained in:
2025-09-03 10:55:30 +02:00
parent 93e5363c7e
commit 4db98bd15f
+12 -9
View File
@@ -69,7 +69,7 @@ class AndStatus(StatusBase):
for st in self.all_statuses: for st in self.all_statuses:
with st._lock: with st._lock:
if st.done and not st.success: if st.done and not st.success:
self.set_exception(st.exception()) self.set_exception(st.exception()) # st._exception
return return
if all(st.done for st in self.all_statuses) and all( if all(st.done for st in self.all_statuses) and all(
@@ -97,13 +97,16 @@ class AndStatus(StatusBase):
return False return False
def set_exception(self, exc): # def set_exception(self, exc):
super().set_exception(exc) # with self._lock:
for st in self.all_statuses: # super().set_exception(exc)
with st._lock: # for st in self.all_statuses:
st.set_exception( # with st._lock:
RuntimeError(f"AndStatus exception on high-level status, caused by {exc}") # #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): def _run_callbacks(self):
""" """
@@ -568,7 +571,7 @@ class Timepix(PSIDeviceBase, TimePixControl):
self.backend.timepix_fly_client.add_status_callback( self.backend.timepix_fly_client.add_status_callback(
status_backend_collect_started, status_backend_collect_started,
success=[TimePixFlyStatus.COLLECT], success=[TimePixFlyStatus.COLLECT],
error=[TimePixFlyStatus.EXCEPT, TimePixFlyStatus.SHUTDOWN, TimePixFlyStatus.CONFIG], error=[TimePixFlyStatus.EXCEPT, TimePixFlyStatus.SHUTDOWN],
) )
# Start on trigger on backend # Start on trigger on backend