Split the index-scheduler in ~500 loc modules

This commit is contained in:
Tamo 2025-01-02 14:13:51 +01:00
parent 7f1071943e
commit cb82b0798a
No known key found for this signature in database
GPG key ID: 20CD8020AFA88D69
251 changed files with 9431 additions and 9079 deletions

View file

@ -608,7 +608,7 @@ async fn document_addition(
}
};
let (uuid, mut update_file) = index_scheduler.create_update_file(dry_run)?;
let (uuid, mut update_file) = index_scheduler.queue.create_update_file(dry_run)?;
let documents_count = match format {
PayloadType::Ndjson => {
let (path, file) = update_file.into_parts();
@ -670,7 +670,7 @@ async fn document_addition(
Err(e) => {
// Here the file MAY have been persisted or not.
// We don't know thus we ignore the file not found error.
match index_scheduler.delete_update_file(uuid) {
match index_scheduler.queue.delete_update_file(uuid) {
Ok(()) => (),
Err(index_scheduler::Error::FileStore(file_store::Error::IoError(e)))
if e.kind() == ErrorKind::NotFound => {}
@ -701,7 +701,7 @@ async fn document_addition(
{
Ok(task) => task,
Err(e) => {
index_scheduler.delete_update_file(uuid)?;
index_scheduler.queue.delete_update_file(uuid)?;
return Err(e.into());
}
};