prefix with REFLEX

This commit is contained in:
Khaleel Al-Adhami 2025-02-19 14:48:20 -08:00
parent c6babe74d3
commit 18a5d20059
2 changed files with 4 additions and 4 deletions

View File

@ -110,7 +110,7 @@ class ConnectionToaster(Toaster):
id=toast_id,
) # pyright: ignore [reportCallIssue]
if environment.DOES_BACKEND_COLD_START.get():
if environment.REFLEX_DOES_BACKEND_COLD_START.get():
loading_message = Var.create("Backend is starting.")
backend_is_loading_toast_var = Var(
f"toast.loading({loading_message!s}, {{...toast_props, description: '', closeButton: false, onDismiss: () => setUserDismissed(true)}},)"
@ -130,7 +130,7 @@ setTimeout(() => {{
if ({has_too_many_connection_errors!s}) {{
setWaitedForBackend(true);
}}
}}, {environment.BACKEND_COLD_START_TIMEOUT.get() * 1000});
}}, {environment.REFLEX_BACKEND_COLD_START_TIMEOUT.get() * 1000});
"""
)
else:

View File

@ -714,10 +714,10 @@ class EnvironmentVariables:
REFLEX_HOT_RELOAD_EXCLUDE_PATHS: EnvVar[List[Path]] = env_var([])
# Enables different behavior for when the backend would do a cold start if it was inactive.
DOES_BACKEND_COLD_START: EnvVar[bool] = env_var(False)
REFLEX_DOES_BACKEND_COLD_START: EnvVar[bool] = env_var(False)
# The timeout for the backend to do a cold start in seconds.
BACKEND_COLD_START_TIMEOUT: EnvVar[int] = env_var(10)
REFLEX_BACKEND_COLD_START_TIMEOUT: EnvVar[int] = env_var(10)
# Used by flexgen to enumerate the pages.
REFLEX_ADD_ALL_ROUTES_ENDPOINT: EnvVar[bool] = env_var(False)