Make CPU threads configurable

This commit is contained in:
Mark Veidemanis 2022-09-20 22:29:13 +01:00
parent 2c5133a546
commit 6de17063a2
Signed by: m
GPG Key ID: 5ACFCEED46C0904F
1 changed files with 1 additions and 1 deletions

View File

@ -74,7 +74,7 @@ nlp = spacy.load("en_core_web_sm", disable=["parser", "ner"])
log = util.get_logger("process") log = util.get_logger("process")
# Maximum number of CPU threads to use for post processing # Maximum number of CPU threads to use for post processing
CPU_THREADS = os.cpu_count() CPU_THREADS = int(os.getenv("MONOLITH_PROCESS_THREADS", os.cpu_count()))
p = ProcessPoolExecutor(CPU_THREADS) p = ProcessPoolExecutor(CPU_THREADS)