daq: automation log message split between success and error
This commit is contained in:
+4
-2
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user