From eb18951686b91fcdfb53b9896dab6d156e5f208e Mon Sep 17 00:00:00 2001 From: Nulo Date: Mon, 18 Dec 2023 14:12:25 -0300 Subject: [PATCH] =?UTF-8?q?reintentar=20cada=20m=C3=A1s=20tiempo=20en=20ra?= =?UTF-8?q?telimit?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- downloader/network.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/downloader/network.js b/downloader/network.js index 80ae273..d75b889 100644 --- a/downloader/network.js +++ b/downloader/network.js @@ -49,7 +49,7 @@ export async function customRequestWithLimitsAndRetries(url, attempts = 0) { ) { if (REPORT_RETRIES) console.debug(`reintentando(status)[${attempts}] ${url.toString()}`); - await wait(15000 + Math.random() * 10000); + await wait(1000 * (attempts + 1) ** 2 + Math.random() * 10000); return await customRequestWithLimitsAndRetries(url, attempts + 1); } // si no fue un error de http, reintentar hasta 3 veces con ~10 segundos de por medio