Skip to content

Commit

Permalink
v0.2.12 add limit
Browse files Browse the repository at this point in the history
  • Loading branch information
Mon-ius committed Jun 10, 2024
1 parent adc17e9 commit bef5cb9
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion hfd-cli/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "hfd-cli"
version = "0.2.11"
version = "0.2.12"
edition = "2021"

[dependencies]
Expand Down
4 changes: 2 additions & 2 deletions hfd-cli/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ async fn download_chunk_with_retry(
println!("Retry {:#?} with {:?} times", e, retries);
error = Some(e);
retries += 1;
std::thread::sleep(Duration::from_millis(100));
std::thread::sleep(Duration::from_secs(10));
}
}
}
Expand Down Expand Up @@ -263,7 +263,7 @@ impl HfClient {
println!("Files: {:?}", files);
let _ = self.create_dir_all(files.clone());

for chunks in files.chunks(10){
for chunks in files.chunks(5){
let mut tasks = futures::stream::FuturesUnordered::new();
for file in chunks{
let url = self.hf_url.path(&file);
Expand Down

0 comments on commit bef5cb9

Please sign in to comment.