Replace the legacy Settings::execute by the new one

This commit is contained in:
ManyTheFish 2025-06-25 11:48:58 +02:00
parent 3aa6c3c750
commit 82fe80b360
14 changed files with 137 additions and 41 deletions

View file

@ -245,11 +245,7 @@ impl IndexScheduler {
let must_stop_processing = self.scheduler.must_stop_processing.clone();
builder
.execute(
|indexing_step| tracing::debug!(update = ?indexing_step),
|| must_stop_processing.get(),
current_batch.embedder_stats.clone(),
)
.execute(&|| must_stop_processing.get(), &progress)
.map_err(|e| Error::from_milli(e, Some(index_uid.to_string())))?;
index_wtxn.commit()?;
}

View file

@ -474,15 +474,11 @@ impl IndexScheduler {
}
progress.update_progress(SettingsProgress::ApplyTheSettings);
builder
.execute(
|indexing_step| tracing::debug!(update = ?indexing_step),
|| must_stop_processing.get(),
embedder_stats,
)
let congestion = builder
.execute(&|| must_stop_processing.get(), progress)
.map_err(|err| Error::from_milli(err, Some(index_uid.clone())))?;
Ok((tasks, None))
Ok((tasks, congestion))
}
IndexOperation::DocumentClearAndSetting {
index_uid,