Expose the --max-number-of-batched-tasks argument

This commit is contained in:
Clément Renault 2023-12-11 16:08:39 +01:00
parent 0fbc1511d7
commit 7e259cb0d2
No known key found for this signature in database
GPG key ID: F250A4C4E3AE5F5F
6 changed files with 36 additions and 5 deletions

View file

@ -584,7 +584,9 @@ impl IndexScheduler {
let index_tasks = self.index_tasks(rtxn, index_name)? & enqueued;
// If autobatching is disabled we only take one task at a time.
let tasks_limit = if self.autobatching_enabled { usize::MAX } else { 1 };
// Otherwise, we take only a maximum of tasks to create batches.
let tasks_limit =
if self.autobatching_enabled { self.max_number_of_batched_tasks } else { 1 };
let enqueued = index_tasks
.into_iter()