From f1fea1027cba0b38f942d3270f05b42241fde565 Mon Sep 17 00:00:00 2001 From: Benedikt Bartscher Date: Thu, 31 Oct 2024 23:36:29 +0100 Subject: [PATCH] move is_prod_mode back to where it was --- reflex/utils/exec.py | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/reflex/utils/exec.py b/reflex/utils/exec.py index 6792e903e..f55603d0d 100644 --- a/reflex/utils/exec.py +++ b/reflex/utils/exec.py @@ -485,6 +485,16 @@ def is_testing_env() -> bool: return constants.PYTEST_CURRENT_TEST in os.environ +def is_prod_mode() -> bool: + """Check if the app is running in production mode. + + Returns: + True if the app is running in production mode or False if running in dev mode. + """ + current_mode = environment.REFLEX_ENV_MODE.get() + return current_mode == constants.Env.PROD + + def is_frontend_only() -> bool: """Check if the app is running in frontend-only mode. @@ -528,13 +538,3 @@ def should_skip_compile() -> bool: removal_version="0.7.0", ) return environment.REFLEX_SKIP_COMPILE.get() - - -def is_prod_mode() -> bool: - """Check if the app is running in production mode. - - Returns: - True if the app is running in production mode or False if running in dev mode. - """ - current_mode = environment.REFLEX_ENV_MODE.get() - return current_mode == constants.Env.PROD