mirror of
https://github.com/meilisearch/MeiliSearch
synced 2025-07-04 20:37:15 +02:00
integration test snapshot
This commit is contained in:
parent
06f9dae0f3
commit
1f16c8d224
5 changed files with 55 additions and 134 deletions
|
@ -39,6 +39,7 @@ where
|
|||
}
|
||||
|
||||
pub async fn run(self) {
|
||||
info!("Snashot scheduled every {}s.", self.snapshot_period.as_secs());
|
||||
loop {
|
||||
sleep(self.snapshot_period).await;
|
||||
if let Err(e) = self.perform_snapshot().await {
|
||||
|
@ -52,6 +53,8 @@ where
|
|||
bail!("Invalid snapshot file path.");
|
||||
}
|
||||
|
||||
info!("Performing snapshot.");
|
||||
|
||||
let temp_snapshot_dir = spawn_blocking(move || tempfile::tempdir_in(".")).await??;
|
||||
let temp_snapshot_path = temp_snapshot_dir.path().to_owned();
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue