w
All checks were successful
CI for csaxs_bec / test (pull_request) Successful in 1m28s
CI for csaxs_bec / test (push) Successful in 1m30s

This commit is contained in:
2026-01-15 10:37:33 +01:00
parent a7367cb561
commit 4a1346d618

View File

@@ -432,18 +432,24 @@ class MCSCardCSAXS(PSIDeviceBase, MCSCard):
self._start_monitor_async_data_emission.clear() # Stop monitoring
# NOTE Important check as set_finished or set_exception should not be called
# if the status is already done (e.g. cancelled externally)
logger.info(f"Status callback called for {self.name}, exception: {exception}")
if status.done:
return # Already done and cancelled externally.
if exception:
status.set_exception(exception)
else:
status.set_finished()
logger.info(
f"Status callback called for {self.name}, exception: {exception} of status {status}."
)
with self._rlock:
if status.done:
return # Already done and cancelled externally.
if exception is not None:
logger.info(f"Setting exception for status of {self.name} in complete.")
status.set_exception(exception)
else:
logger.info(f"Setting finished for status of {self.name} in complete.")
status.set_finished()
def _status_failed_callback(self, status: StatusBase) -> None:
"""Callback for status failure, the monitoring thread should be stopped."""
# NOTE Check for status.done and status.success is important to avoid
if status.done:
self._start_monitor_async_data_emission.clear() # Stop monitoring
def on_complete(self) -> CompareStatus: