Skip to content

Commit

Permalink
limitar delay al que retryear
Browse files Browse the repository at this point in the history
  • Loading branch information
catdevnull committed Feb 6, 2024
1 parent 5a6d8c6 commit ed7af76
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions scraper-rs/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}

Expand Down

0 comments on commit ed7af76

Please sign in to comment.