From 6c91c19a5dc6ed67c65e6bb43fb02ebcb690a6ff Mon Sep 17 00:00:00 2001 From: Masen Furer Date: Wed, 11 Dec 2024 10:18:10 -0800 Subject: [PATCH] Fix REFLEX_COMPILE_PROCESSES=0 when zero is passed, that is short for "use the default", which is actually None in the code. fix for both processes and threads being set to zero --- reflex/app.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/reflex/app.py b/reflex/app.py index eb453bd0bb..6a17a56b6a 100644 --- a/reflex/app.py +++ b/reflex/app.py @@ -947,12 +947,12 @@ def get_compilation_time() -> str: is not None ): executor = concurrent.futures.ProcessPoolExecutor( - max_workers=number_of_processes, + max_workers=number_of_processes or None, mp_context=multiprocessing.get_context("fork"), ) else: executor = concurrent.futures.ThreadPoolExecutor( - max_workers=environment.REFLEX_COMPILE_THREADS.get() + max_workers=environment.REFLEX_COMPILE_THREADS.get() or None ) for route, component in zip(self.pages, page_components):