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__":
for attr in attributes:
logger.info("Extracting attribute %s..."%attr)
try:
datevalue = query_ADB_BetweenDates(attr, args.dateStart, args.dateStop, extractor)
# Add to result dictionnary
results[attr] = datevalue
except ValueError as e:
logger.debug("ErrorMsg: %s"%e)
logger.warning("Failed to extract %s. Skipping..."%attr)
except tango.CommunicationFailed:
logger.warning("Failed to extract %s. Skipping..."%attr)
logger.error("The device %s might have crash.\n"+
for attempt in range(3):
try:
datevalue = query_ADB_BetweenDates(attr, args.dateStart, args.dateStop, extractor)
# Add to result dictionnary
results[attr] = datevalue
except ValueError as e:
logger.debug("ErrorMsg: %s"%e)
logger.warning("Failed to extract %s. Skipping..."%attr)
except (tango.CommunicationFailed, tango.DevFailed) as e:
# 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")
# 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