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

Allow REFLEX_COMPILE_PROCESSES=0 to trigger multiprocessing with auto workers

Masen Furer преди 1 година
родител
ревизия
51bf447eb7
променени са 1 файла, в които са добавени 3 реда и са изтрити 2 реда
  1. 3 2
      reflex/app.py

+ 3 - 2
reflex/app.py

@@ -860,8 +860,9 @@ class App(Base):
         # Use a forking process pool, if possible.  Much faster, especially for large sites.
         # Fallback to ThreadPoolExecutor as something that will always work.
         executor = None
-        if platform.system() in ("Linux", "Darwin") and os.environ.get(
-            "REFLEX_COMPILE_PROCESSES"
+        if (
+            platform.system() in ("Linux", "Darwin")
+            and os.environ.get("REFLEX_COMPILE_PROCESSES") is not None
         ):
             executor = concurrent.futures.ProcessPoolExecutor(
                 max_workers=int(os.environ.get("REFLEX_COMPILE_PROCESSES", 0)) or None,