Make CPU threads configurable
This commit is contained in:
parent
40a0c2d22e
commit
31c58dd85b
|
@ -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)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue