From ed7af7621d9ff2b46bf9a01ff70acaa87cdbf721 Mon Sep 17 00:00:00 2001 From: Nulo Date: Tue, 6 Feb 2024 20:52:18 -0300 Subject: [PATCH] limitar delay al que retryear --- scraper-rs/src/main.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/scraper-rs/src/main.rs b/scraper-rs/src/main.rs index b10686c..f0adafd 100644 --- a/scraper-rs/src/main.rs +++ b/scraper-rs/src/main.rs @@ -192,6 +192,7 @@ pub async fn fetch_body(client: &reqwest::Client, url: &str) -> reqwest::Result< pub fn get_retry_policy() -> again::RetryPolicy { RetryPolicy::exponential(Duration::from_millis(300)) .with_max_retries(20) + .with_max_delay(Duration::from_secs(40)) .with_jitter(true) }