use options to schedule snapshot

This commit is contained in:
mpostma 2021-03-17 12:01:56 +01:00
parent ee838be41b
commit c966b1dd94
No known key found for this signature in database
GPG key ID: CBC8A7C1D7A28C3A
3 changed files with 21 additions and 14 deletions

View file

@ -191,8 +191,8 @@ pub struct Opt {
pub schedule_snapshot: bool,
/// Defines time interval, in seconds, between each snapshot creation.
#[structopt(long, env = "MEILI_SNAPSHOT_INTERVAL_SEC")]
pub snapshot_interval_sec: Option<u64>,
#[structopt(long, env = "MEILI_SNAPSHOT_INTERVAL_SEC", default_value = "86400")] // 24h
pub snapshot_interval_sec: u64,
/// Folder where dumps are created when the dump route is called.
#[structopt(long, env = "MEILI_DUMPS_DIR", default_value = "dumps/")]