limitar delay al que retryear

This commit is contained in:
Cat /dev/Nulo 2024-02-06 20:52:18 -03:00
parent 5a6d8c635e
commit ed7af7621d

View file

@ -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)
}