Skip to content

Commit

Permalink
internal: make sure finish compress before copy
Browse files Browse the repository at this point in the history
  • Loading branch information
Young-Flash committed Nov 29, 2024
1 parent 4a1ab21 commit 06b26fe
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -449,6 +449,7 @@ fn main0() -> anyhow::Result<()> {
let mut writer = std::io::BufWriter::new(encoder);
writeln!(writer, "{}", serde_json::to_string(&dashboard)?)?;
writer.flush()?;
writer.into_inner()?.finish()?;

let latest_filename = "webapp/public/latest_data.jsonl.gz";
std::fs::copy(&filename, latest_filename)?;
Expand Down

0 comments on commit 06b26fe

Please sign in to comment.