Skip to content
Snippets Groups Projects
Commit 6c3923c2 authored by BRONES Romain's avatar BRONES Romain
Browse files

[ArchiveExtractor] Add retry on DevFailed

parent 24dffcff
No related branches found
No related tags found
No related merge requests found
...@@ -455,18 +455,24 @@ if __name__ == "__main__": ...@@ -455,18 +455,24 @@ if __name__ == "__main__":
for attr in attributes: for attr in attributes:
logger.info("Extracting attribute %s..."%attr) logger.info("Extracting attribute %s..."%attr)
try: for attempt in range(3):
datevalue = query_ADB_BetweenDates(attr, args.dateStart, args.dateStop, extractor) try:
datevalue = query_ADB_BetweenDates(attr, args.dateStart, args.dateStop, extractor)
# Add to result dictionnary
results[attr] = datevalue # Add to result dictionnary
results[attr] = datevalue
except ValueError as e:
logger.debug("ErrorMsg: %s"%e) except ValueError as e:
logger.warning("Failed to extract %s. Skipping..."%attr) logger.debug("ErrorMsg: %s"%e)
except tango.CommunicationFailed: logger.warning("Failed to extract %s. Skipping..."%attr)
logger.warning("Failed to extract %s. Skipping..."%attr) except (tango.CommunicationFailed, tango.DevFailed) as e:
logger.error("The device %s might have crash.\n"+ # retry
logger.debug("ErrorMsg: %s"%e)
logger.warning("Failed to extract %s. Retry..."%attr)
break
else:
logger.error("The device %s might have crash.\n"%extractor+
"You should check with Jive and probably restart with Astor.\n") "You should check with Jive and probably restart with Astor.\n")
# Save all at each step # Save all at each step
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment