mirror of
https://github.com/meilisearch/MeiliSearch
synced 2025-07-04 12:27:13 +02:00
fix bug and add tests
- add tests about updates - fix select bug fix #896
This commit is contained in:
parent
cb267b68ed
commit
94b3e8e56e
5 changed files with 206 additions and 30 deletions
|
@ -70,7 +70,7 @@ async fn main() -> Result<(), MainError> {
|
|||
}));
|
||||
|
||||
if let Some(path) = &opt.snapshot_path {
|
||||
snapshot::schedule_snapshot(data.clone(), &path, opt.snapshot_interval_sec)?;
|
||||
snapshot::schedule_snapshot(data.clone(), &path, opt.snapshot_interval_sec.unwrap_or(86400))?;
|
||||
}
|
||||
|
||||
print_launch_resume(&opt, &data);
|
||||
|
|
|
@ -113,8 +113,8 @@ pub struct Opt {
|
|||
pub snapshot_path: Option<PathBuf>,
|
||||
|
||||
/// Defines time interval, in seconds, between each snapshot creation.
|
||||
#[structopt(long, requires = "snapshot-path", default_value = "86400", env = "MEILI_SNAPSHOT_INTERVAL_SEC")]
|
||||
pub snapshot_interval_sec: u64,
|
||||
#[structopt(long, requires = "snapshot-path", env = "MEILI_SNAPSHOT_INTERVAL_SEC")]
|
||||
pub snapshot_interval_sec: Option<u64>,
|
||||
}
|
||||
|
||||
impl Opt {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue