Skip to content

Commit

Permalink
Reduce concurrent requests
Browse files Browse the repository at this point in the history
Countdown API returns 500 Internal Server Errors when attempting to
request too many pages at once. We mitigate this by reducing the
concurrent threads from 12 to 6.
  • Loading branch information
OverHash committed Dec 27, 2023
1 parent 7039643 commit 4b3deef
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@ pub const CACHE_PATH: &str = "cache.json";
/// The amount of milliseconds to wait between performing iterations on the pages.
pub const PAGE_ITERATION_INTERVAL: Duration = Duration::from_millis(500);
/// The amount of requests to perform in parallel.
pub const CONCURRENT_REQUESTS: i64 = 12;
pub const CONCURRENT_REQUESTS: i64 = 6;

0 comments on commit 4b3deef

Please sign in to comment.