Преглед на файлове

Fix REFLEX_COMPILE_PROCESSES=0 (#4523)

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
Masen Furer преди 5 месеца
родител
ревизия
d75a708e6b
променени са 1 файла, в които са добавени 2 реда и са изтрити 2 реда
  1. 2 2
      reflex/app.py

+ 2 - 2
reflex/app.py

@@ -947,12 +947,12 @@ class App(MiddlewareMixin, LifespanMixin):
             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):