Introduce the core algorithm of task cancelation

This commit is contained in:
Kerollmops 2022-10-18 13:47:22 +02:00 committed by Clément Renault
parent 6276b2a382
commit 74657bba2c
No known key found for this signature in database
GPG key ID: 92ADA4E935E71FA4
6 changed files with 57 additions and 20 deletions

View file

@ -271,9 +271,10 @@ fn import_dump(
log::info!("Importing the settings.");
let settings = index_reader.settings()?;
apply_settings_to_builder(&settings, &mut builder);
builder.execute(|indexing_step| {
log::debug!("update: {:?}", indexing_step);
})?;
builder.execute(
|indexing_step| log::debug!("update: {:?}", indexing_step),
|| false,
)?;
// 3.3 Import the documents.
// 3.3.1 We need to recreate the grenad+obkv format accepted by the index.
@ -300,6 +301,7 @@ fn import_dump(
..Default::default()
},
|indexing_step| log::debug!("update: {:?}", indexing_step),
|| false,
)?;
let (builder, user_result) = builder.add_documents(reader)?;