mirror of
https://codeberg.org/comaps/comaps
synced 2025-12-19 13:03:36 +00:00
4 threads for Taiwan_North search indexer.
Signed-off-by: Viktor Govako <viktor.govako@gmail.com>
This commit is contained in:
committed by
Konstantin Pastbin
parent
c0469ddef2
commit
dde65a918b
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user