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
This commit is contained in:
Irevoire
2022-02-14 15:32:41 +01:00
parent 216965e9d9
commit 05c8d81e65
33 changed files with 369 additions and 226 deletions

View File

@ -6,8 +6,8 @@ use std::sync::Arc;
use std::time::Duration;
use atomic_refcell::AtomicRefCell;
use chrono::Utc;
use milli::update::IndexDocumentsMethod;
use time::OffsetDateTime;
use tokio::sync::{watch, RwLock};
use crate::options::SchedulerConfig;
@ -357,7 +357,7 @@ impl Scheduler {
tasks.iter_mut().for_each(|t| {
t.events.push(TaskEvent::Batched {
batch_id: id,
timestamp: Utc::now(),
timestamp: OffsetDateTime::now_utc(),
})
});
@ -365,7 +365,7 @@ impl Scheduler {
let batch = Batch {
id,
created_at: Utc::now(),
created_at: OffsetDateTime::now_utc(),
tasks,
};