4 threads for Taiwan_North search indexer.

Signed-off-by: Viktor Govako <viktor.govako@gmail.com>
This commit is contained in:
Viktor Govako
2024-10-08 22:49:57 -03:00
committed by Konstantin Pastbin
parent c0469ddef2
commit dde65a918b

View File

@@ -33,10 +33,12 @@ logger = logging.getLogger("maps_generator")
def multithread_run_if_one_country(func):
@functools.wraps(func)
def wrap(env, *args, **kwargs):
def wrap(env, country, **kwargs):
if len(env.countries) == 1:
kwargs.update({"threads_count": settings.THREADS_COUNT})
func(env, *args, **kwargs)
elif country == 'Taiwan_North':
kwargs.update({"threads_count": 4})
func(env, country, **kwargs)
return wrap