Add some documentation to the index scheduler

This commit is contained in:
Loïc Lecrenier 2022-10-20 10:25:34 +02:00 committed by Clément Renault
parent 2f54dade04
commit 835745ac22
No known key found for this signature in database
GPG key ID: 92ADA4E935E71FA4
6 changed files with 180 additions and 64 deletions

View file

@ -293,11 +293,11 @@ pub fn create_all_stats(
let mut last_task: Option<OffsetDateTime> = None;
let mut indexes = BTreeMap::new();
let mut database_size = 0;
let processing_task = index_scheduler.get_tasks(
Query::default()
.with_status(Status::Processing)
.with_limit(1),
)?;
let processing_task = index_scheduler.get_tasks(Query {
status: Some(vec![Status::Processing]),
limit: Some(1),
..Query::default()
})?;
let processing_index = processing_task
.first()
.and_then(|task| task.index_uid().clone());