Skip to content

Commit

Permalink
Fix REFLEX_COMPILE_PROCESSES=0 (reflex-dev#4523)
Browse files Browse the repository at this point in the history
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
  • Loading branch information
masenf authored Dec 11, 2024
1 parent 2ee201b commit d75a708
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions reflex/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down

0 comments on commit d75a708

Please sign in to comment.