mirror of
https://github.com/meilisearch/MeiliSearch
synced 2025-07-03 11:57:07 +02:00
Revert thread_pool type back to Option in config
This commit is contained in:
parent
648b2876f6
commit
3b773b3416
6 changed files with 32 additions and 34 deletions
|
@ -115,8 +115,7 @@ impl IndexScheduler {
|
|||
|
||||
let local_pool;
|
||||
let indexer_config = self.index_mapper.indexer_config();
|
||||
let pool_guard = indexer_config.thread_pool.read().unwrap();
|
||||
let pool = match &*pool_guard {
|
||||
let pool = match &indexer_config.thread_pool {
|
||||
Some(pool) => pool,
|
||||
None => {
|
||||
local_pool = ThreadPoolNoAbortBuilder::new()
|
||||
|
@ -269,8 +268,7 @@ impl IndexScheduler {
|
|||
if task.error.is_none() {
|
||||
let local_pool;
|
||||
let indexer_config = self.index_mapper.indexer_config();
|
||||
let pool_guard = indexer_config.thread_pool.read().unwrap();
|
||||
let pool = match &*pool_guard {
|
||||
let pool = match &indexer_config.thread_pool {
|
||||
Some(pool) => pool,
|
||||
None => {
|
||||
local_pool = ThreadPoolNoAbortBuilder::new()
|
||||
|
@ -433,8 +431,7 @@ impl IndexScheduler {
|
|||
if !tasks.iter().all(|res| res.error.is_some()) {
|
||||
let local_pool;
|
||||
let indexer_config = self.index_mapper.indexer_config();
|
||||
let pool_guard = indexer_config.thread_pool.read().unwrap();
|
||||
let pool = match &*pool_guard {
|
||||
let pool = match &indexer_config.thread_pool {
|
||||
Some(pool) => pool,
|
||||
None => {
|
||||
local_pool = ThreadPoolNoAbortBuilder::new()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue