mirror of
https://github.com/meilisearch/MeiliSearch
synced 2024-11-22 21:04:27 +01:00
cargo fmt
This commit is contained in:
parent
ec3391808d
commit
23b01a58df
@ -80,15 +80,24 @@ impl IndexScheduler {
|
|||||||
})?;
|
})?;
|
||||||
}
|
}
|
||||||
|
|
||||||
assert!(old_task.enqueued_at != task.enqueued_at, "Cannot update a task's enqueued_at time");
|
assert!(
|
||||||
|
old_task.enqueued_at != task.enqueued_at,
|
||||||
|
"Cannot update a task's enqueued_at time"
|
||||||
|
);
|
||||||
if old_task.started_at != task.started_at {
|
if old_task.started_at != task.started_at {
|
||||||
assert!(old_task.started_at.is_none(), "Cannot update a task's started_at time");
|
assert!(
|
||||||
|
old_task.started_at.is_none(),
|
||||||
|
"Cannot update a task's started_at time"
|
||||||
|
);
|
||||||
if let Some(started_at) = task.started_at {
|
if let Some(started_at) = task.started_at {
|
||||||
insert_task_datetime(wtxn, self.started_at, started_at, task.uid)?;
|
insert_task_datetime(wtxn, self.started_at, started_at, task.uid)?;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if old_task.finished_at != task.finished_at {
|
if old_task.finished_at != task.finished_at {
|
||||||
assert!(old_task.finished_at.is_none(), "Cannot update a task's finished_at time");
|
assert!(
|
||||||
|
old_task.finished_at.is_none(),
|
||||||
|
"Cannot update a task's finished_at time"
|
||||||
|
);
|
||||||
if let Some(finished_at) = task.finished_at {
|
if let Some(finished_at) = task.finished_at {
|
||||||
insert_task_datetime(wtxn, self.finished_at, finished_at, task.uid)?;
|
insert_task_datetime(wtxn, self.finished_at, finished_at, task.uid)?;
|
||||||
}
|
}
|
||||||
@ -191,7 +200,6 @@ pub(crate) fn insert_task_datetime(
|
|||||||
Ok(())
|
Ok(())
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
pub(crate) fn remove_task_datetime(
|
pub(crate) fn remove_task_datetime(
|
||||||
wtxn: &mut RwTxn,
|
wtxn: &mut RwTxn,
|
||||||
database: Database<OwnedType<BEI128>, CboRoaringBitmapCodec>,
|
database: Database<OwnedType<BEI128>, CboRoaringBitmapCodec>,
|
||||||
|
Loading…
Reference in New Issue
Block a user