Skip to content

Commit

Permalink
print a warning when the trace file is missing rather than wait
Browse files Browse the repository at this point in the history
  • Loading branch information
arlyon committed Aug 1, 2024
1 parent 54b5b6d commit 2a8efb4
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion crates/turbopack-trace-server/src/reader/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -79,8 +79,13 @@ impl TraceReader {
}

pub fn run(&mut self) {
let mut file_warning_printed = false;
loop {
self.try_read();
let read_success = self.try_read();
if !file_warning_printed && !read_success {
println!("Unable to read trace file at {:?}, waiting...", self.path);
file_warning_printed = true;
}
thread::sleep(Duration::from_millis(500));
}
}
Expand Down

0 comments on commit 2a8efb4

Please sign in to comment.