daq: automation log message split between success and error

This commit is contained in:
2026-06-22 10:40:23 +02:00
parent 924fabb7d9
commit a5718f3f84
+4 -2
View File
@@ -2607,6 +2607,7 @@ class AareDAQ:
if error:
msg += f"with an error"
logger.error(f"{msg}, time taken {time.perf_counter() - start} seconds.")
try:
if self.__cfg.state_busy:
self.__set_state(BeamlineStateEnum.RobotSampleExchange)
@@ -2620,9 +2621,10 @@ class AareDAQ:
logger.exception(
"Failed to transition to RobotSampleExchange during error recovery"
)
else:
msg += f"successfully"
logger.error(f"{msg}, time taken {time.perf_counter() - start} seconds.")
msg += f" successfully"
logger.info(f"{msg}, time taken {time.perf_counter() - start} seconds.")
self.__cfg.state_busy = False
end = time.perf_counter()
return end - start