Display an accurate number of uploaded documents

This commit is contained in:
Clément Renault
2025-06-30 18:46:47 +02:00
parent 85037352b9
commit ad03c86c44
3 changed files with 24 additions and 15 deletions

View File

@ -377,9 +377,8 @@ impl IndexScheduler {
)
}));
match ret {
// TODO return the matched and exported documents
Ok(Ok(())) => (),
let stats = match ret {
Ok(Ok(stats)) => stats,
Ok(Err(Error::AbortedTask)) => return Err(Error::AbortedTask),
Ok(Err(e)) => return Err(Error::Export(Box::new(e))),
Err(e) => {
@ -394,9 +393,12 @@ impl IndexScheduler {
msg.to_string(),
))));
}
}
};
task.status = Status::Succeeded;
if let Some(Details::Export { indexes, .. }) = task.details.as_mut() {
*indexes = stats;
}
Ok((vec![task], ProcessBatchInfo::default()))
}
Batch::UpgradeDatabase { mut tasks } => {