1
0
mirror of https://github.com/EDCD/EDMarketConnector.git synced 2025-04-14 08:17:13 +03:00

Increase retry pause for shipyard data to 4s.

This commit is contained in:
Jonathan Harris 2015-07-08 12:31:57 +01:00
parent b00da39cf0
commit a0fcf3ad66

View File

@ -200,8 +200,8 @@ class AppWindow:
elif not data.get('ship') or not data['ship'].get('modules') or not data['ship'].get('name','').strip():
self.status['text'] = "What are you flying?!" # Shouldn't happen
elif (config.getint('output') & config.OUT_EDDN) and not data['lastStarport'].get('ships') and not retrying:
# API is flakey about shipyard info - retry if missing (<1s is usually sufficient - 2.5s for margin).
self.w.after(2500, lambda:self.getandsend(retrying=True))
# API is flakey about shipyard info - retry if missing (<1s is usually sufficient - 4s for margin).
self.w.after(4000, lambda:self.getandsend(retrying=True))
return
else:
if __debug__ and retrying: print data['lastStarport'].get('ships') and 'Retry for shipyard - Success' or 'Retry for shipyard - Fail'