default to None, as 0 would raise a ValueError
Co-authored-by: Masen Furer <m_github@0x26.net>
This commit is contained in:
parent
92c0a66b34
commit
6e62a06d99
@ -1197,12 +1197,12 @@ class App(MiddlewareMixin, LifespanMixin):
|
|||||||
match executor_type:
|
match executor_type:
|
||||||
case ExecutorType.PROCESS:
|
case ExecutorType.PROCESS:
|
||||||
executor = concurrent.futures.ProcessPoolExecutor(
|
executor = concurrent.futures.ProcessPoolExecutor(
|
||||||
max_workers=environment.REFLEX_COMPILE_PROCESSES.get(),
|
max_workers=environment.REFLEX_COMPILE_PROCESSES.get() or None,
|
||||||
mp_context=multiprocessing.get_context("fork"),
|
mp_context=multiprocessing.get_context("fork"),
|
||||||
)
|
)
|
||||||
case ExecutorType.THREAD:
|
case ExecutorType.THREAD:
|
||||||
executor = concurrent.futures.ThreadPoolExecutor(
|
executor = concurrent.futures.ThreadPoolExecutor(
|
||||||
max_workers=environment.REFLEX_COMPILE_THREADS.get()
|
max_workers=environment.REFLEX_COMPILE_THREADS.get() or None
|
||||||
)
|
)
|
||||||
case ExecutorType.MAIN_THREAD:
|
case ExecutorType.MAIN_THREAD:
|
||||||
T = TypeVar("T")
|
T = TypeVar("T")
|
||||||
|
Loading…
Reference in New Issue
Block a user