mirror of
https://github.com/meilisearch/MeiliSearch
synced 2025-07-03 20:07:09 +02:00
perform snapshot on startup
This commit is contained in:
parent
d892a2643e
commit
79d09705d8
1 changed files with 2 additions and 2 deletions
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue