MeiliSearch/meilisearch-lib/src/tasks/batch.rs
Irevoire 05c8d81e65
chore: get rid of chrono in favor of time
Chrono has been unmaintened for a few month now and there is a CVE on it.

make clippy happy

bump milli
2022-02-16 18:14:29 +01:00

23 lines
351 B
Rust

use time::OffsetDateTime;
use super::task::Task;
pub type BatchId = u64;
#[derive(Debug)]
pub struct Batch {
pub id: BatchId,
pub created_at: OffsetDateTime,
pub tasks: Vec<Task>,
}
impl Batch {
pub fn len(&self) -> usize {
self.tasks.len()
}
pub fn is_empty(&self) -> bool {
self.tasks.is_empty()
}
}