reduce wait time growth rate from exponential to linear

Waiting for 2**N seconds after each error grows too fast.
Simply waiting N seconds seems far more reasonable.
This commit is contained in:
Mike Fährmann
2020-09-06 22:38:25 +02:00
parent bc48514d84
commit f6fd449b59
4 changed files with 7 additions and 12 deletions

View File

@@ -87,7 +87,7 @@ class HttpDownloader(DownloaderBase):
self.log.warning("%s (%s/%s)", msg, tries, self.retries+1)
if tries > self.retries:
return False
time.sleep(min(2 ** (tries-1), 1800))
time.sleep(tries)
tries += 1
headers = {}