From 79d09705d829773fde76f71cbc4e57f81fb59382 Mon Sep 17 00:00:00 2001 From: mpostma Date: Thu, 25 Mar 2021 09:34:29 +0100 Subject: [PATCH] perform snapshot on startup --- meilisearch-http/src/index_controller/snapshot.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/meilisearch-http/src/index_controller/snapshot.rs b/meilisearch-http/src/index_controller/snapshot.rs index c433e3959..8eccb16bf 100644 --- a/meilisearch-http/src/index_controller/snapshot.rs +++ b/meilisearch-http/src/index_controller/snapshot.rs @@ -40,14 +40,14 @@ where pub async fn run(self) { info!( - "Snashot scheduled every {}s.", + "Snapshot scheduled every {}s.", self.snapshot_period.as_secs() ); loop { - sleep(self.snapshot_period).await; if let Err(e) = self.perform_snapshot().await { error!("{}", e); } + sleep(self.snapshot_period).await; } }