diff options
-rw-r--r-- | fatcat-cli/src/download.rs | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/fatcat-cli/src/download.rs b/fatcat-cli/src/download.rs index 53c5a41..916f550 100644 --- a/fatcat-cli/src/download.rs +++ b/fatcat-cli/src/download.rs @@ -415,8 +415,12 @@ pub fn download_batch( let buffered = io::BufReader::new(input_file); let lines = buffered.lines(); for line in lines { - let json_str = line?; - download_entity(json_str, output_dir.clone(), show_progress)?; + let task = DownloadTask { + json_str: line?, + output_path: output_dir.clone(), + show_progress, + }; + task_sender.send(task)?; count += 1; if let Some(limit) = limit { if count >= limit { |