mirror of
https://github.com/derrod/legendary.git
synced 2024-12-22 17:55:27 +00:00
[downloader.mp] Fix exponential backoff calculation and log as info
This commit is contained in:
parent
b19a482fdb
commit
75cc194424
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue