perform snapshot on startup

This commit is contained in:
mpostma 2021-03-25 09:34:29 +01:00
parent d892a2643e
commit 79d09705d8
No known key found for this signature in database
GPG Key ID: CBC8A7C1D7A28C3A

View File

@ -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;
}
}