mirror of
https://github.com/meilisearch/meilisearch.git
synced 2024-11-23 02:27:40 +08:00
perform snapshot on startup
This commit is contained in:
parent
d892a2643e
commit
79d09705d8
@ -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…
Reference in New Issue
Block a user