[downloader.mp] Fix exponential backoff calculation and log as info

This commit is contained in:
derrod 2021-10-07 11:16:39 +02:00
parent b19a482fdb
commit 75cc194424

View file

@ -67,8 +67,8 @@ class DLWorker(Process):
while tries < self.max_retries:
# retry once immediately, otherwise do exponential backoff
if tries > 1:
sleep_time = 2**(tries+1)
logger.debug(f'Sleeping {sleep_time} seconds before retrying...')
sleep_time = 2**(tries-1)
logger.info(f'Sleeping {sleep_time} seconds before retrying.')
time.sleep(sleep_time)
# print('Downloading', job.url)