From 6de17063a21941dcbb2fa8b1a6d888a8dc1cb6e2 Mon Sep 17 00:00:00 2001 From: Mark Veidemanis Date: Tue, 20 Sep 2022 22:29:13 +0100 Subject: [PATCH] Make CPU threads configurable --- processing/process.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/processing/process.py b/processing/process.py index 4a6409c..c55737d 100644 --- a/processing/process.py +++ b/processing/process.py @@ -74,7 +74,7 @@ nlp = spacy.load("en_core_web_sm", disable=["parser", "ner"]) log = util.get_logger("process") # 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)