Don't bind request_threads() to a local variable

This commit is contained in:
Louis Dureuil 2024-06-19 15:23:11 +02:00
parent 6254c7cee1
commit e64d0a206e
No known key found for this signature in database

View File

@ -239,8 +239,6 @@ fn send_original_documents_data(
let documents_chunk_cloned = original_documents_chunk.clone();
let lmdb_writer_sx_cloned = lmdb_writer_sx.clone();
let request_threads = request_threads();
if settings_diff.reindex_vectors() || !settings_diff.settings_update_only() {
let settings_diff = settings_diff.clone();
rayon::spawn(move || {
@ -258,7 +256,7 @@ fn send_original_documents_data(
prompts,
indexer,
embedder.clone(),
request_threads,
request_threads(),
) {
Ok(results) => Some(results),
Err(error) => {