Merge --schedule-snapshot and --snapshot-interval-sec options

This commit is contained in:
Louis Dureuil 2022-12-27 18:17:29 +01:00
parent 12c3d432f9
commit c4aa5cc7d0
No known key found for this signature in database
5 changed files with 123 additions and 31 deletions

View file

@ -1,5 +1,6 @@
use std::time::Duration;
use meilisearch::option::ScheduleSnapshot;
use meilisearch::Opt;
use tokio::time::sleep;
@ -36,8 +37,7 @@ async fn perform_snapshot() {
let options = Opt {
snapshot_dir: snapshot_dir.path().to_owned(),
snapshot_interval_sec: 1,
schedule_snapshot: true,
schedule_snapshot: ScheduleSnapshot::Enabled(1),
..default_settings(temp.path())
};