From 75cc1944245360c0900e5620885da26bba2b903b Mon Sep 17 00:00:00 2001 From: derrod Date: Thu, 7 Oct 2021 11:16:39 +0200 Subject: [PATCH] [downloader.mp] Fix exponential backoff calculation and log as info --- legendary/downloader/mp/workers.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/legendary/downloader/mp/workers.py b/legendary/downloader/mp/workers.py index 74e34e4..96be350 100644 --- a/legendary/downloader/mp/workers.py +++ b/legendary/downloader/mp/workers.py @@ -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)