Server: adds explicit flush calls

Allows to get explicit errors if flush fails when closing the store
pull/435/head
Tpt 2 years ago committed by Thomas Tanon
parent 20dc1f26df
commit 21994d39fd
  1. 2
      server/src/main.rs

@ -373,6 +373,7 @@ pub fn main() -> anyhow::Result<()> {
}) })
} }
}); });
store.flush()?;
Ok(()) Ok(())
} }
} }
@ -568,6 +569,7 @@ pub fn main() -> anyhow::Result<()> {
.ok_or_else(|| anyhow!("The --location argument is required"))?, .ok_or_else(|| anyhow!("The --location argument is required"))?,
)?; )?;
store.update(update)?; store.update(update)?;
store.flush()?;
Ok(()) Ok(())
} }
Command::Optimize {} => { Command::Optimize {} => {

Loading…
Cancel
Save