mirror of
https://github.com/meilisearch/meilisearch.git
synced 2024-11-23 10:37:41 +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) {
|
pub async fn run(self) {
|
||||||
info!(
|
info!(
|
||||||
"Snashot scheduled every {}s.",
|
"Snapshot scheduled every {}s.",
|
||||||
self.snapshot_period.as_secs()
|
self.snapshot_period.as_secs()
|
||||||
);
|
);
|
||||||
loop {
|
loop {
|
||||||
sleep(self.snapshot_period).await;
|
|
||||||
if let Err(e) = self.perform_snapshot().await {
|
if let Err(e) = self.perform_snapshot().await {
|
||||||
error!("{}", e);
|
error!("{}", e);
|
||||||
}
|
}
|
||||||
|
sleep(self.snapshot_period).await;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user