Skip to content

Commit

Permalink
revert
Browse files Browse the repository at this point in the history
  • Loading branch information
guipenedo committed Nov 26, 2024
1 parent 3f8d060 commit f4cd9ac
Showing 1 changed file with 0 additions and 21 deletions.
21 changes: 0 additions & 21 deletions src/datatrove/pipeline/dedup/fast_mh3/src/main.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
use std::fs::File;
use std::io::Write;
use std::io::Cursor;
use std::collections::HashMap;
use anyhow::{Context, Result};
Expand Down Expand Up @@ -374,14 +372,6 @@ async fn process_post_union(
.progress_chars("#>-"));
pb.enable_steady_tick(std::time::Duration::from_secs(1));

// Create a custom draw target that writes to both stderr and the log file
pb.set_draw_target(indicatif::ProgressDrawTarget::custom(Box::new(
|s| {
std::io::stderr().write_all(s.as_bytes()).unwrap();
log_file.write_all(s.as_bytes()).unwrap();
},
)));

let mut handles = Vec::new();
for file_number in files {
let client = client.clone();
Expand Down Expand Up @@ -434,9 +424,6 @@ async fn main() -> Result<()> {
Semaphore::new(args.downloads)
});

// Open the log file for writing
let mut log_file = File::create(&args.logspath)?;

println!("Processing {} input files...", files.len());
let pb = ProgressBar::new(files.len() as u64);
pb.set_style(ProgressStyle::default_bar()
Expand All @@ -445,14 +432,6 @@ async fn main() -> Result<()> {
.progress_chars("#>-"));
pb.enable_steady_tick(std::time::Duration::from_secs(1));

// Create a custom draw target that writes to both stderr and the log file
pb.set_draw_target(indicatif::ProgressDrawTarget::custom(Box::new(
|s| {
std::io::stderr().write_all(s.as_bytes()).unwrap();
log_file.write_all(s.as_bytes()).unwrap();
},
)));

let mut handles = Vec::new();

for file_path in files {
Expand Down

0 comments on commit f4cd9ac

Please sign in to comment.