mirror of
https://github.com/meilisearch/MeiliSearch
synced 2025-07-04 04:17:10 +02:00
Don't process any tasks if the max number of batched tasks is set to 0
This commit is contained in:
parent
d9a527854a
commit
8608d10fa2
1 changed files with 5 additions and 0 deletions
|
@ -381,6 +381,11 @@ impl IndexScheduler {
|
|||
/// This function will execute in a different thread and must be called
|
||||
/// only once per index scheduler.
|
||||
fn run(&self) {
|
||||
// If the number of batched tasks is 0, we don't need to run the scheduler at all.
|
||||
// It will never be able to process any tasks.
|
||||
if self.scheduler.max_number_of_batched_tasks == 0 {
|
||||
return;
|
||||
}
|
||||
let run = self.private_clone();
|
||||
std::thread::Builder::new()
|
||||
.name(String::from("scheduler"))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue