implemented 'is_dev_mode_enabled' to lib functions

This commit is contained in:
Jakub Trllo 2024-02-07 17:04:26 +01:00
parent 5a21d04315
commit 955ca726e9
2 changed files with 12 additions and 0 deletions

View file

@ -157,6 +157,7 @@ from .path_tools import (
from .ayon_info import ( from .ayon_info import (
is_running_from_build, is_running_from_build,
is_staging_enabled, is_staging_enabled,
is_dev_mode_enabled,
) )
@ -276,6 +277,7 @@ __all__ = [
"is_running_from_build", "is_running_from_build",
"is_staging_enabled", "is_staging_enabled",
"is_dev_mode_enabled",
"requests_get", "requests_get",
"requests_post" "requests_post"

View file

@ -38,6 +38,16 @@ def is_staging_enabled():
return os.getenv("AYON_USE_STAGING") == "1" return os.getenv("AYON_USE_STAGING") == "1"
def is_dev_mode_enabled():
"""Dev mode is enabled in AYON.
Returns:
bool: True if dev mode is enabled.
"""
return os.getenv("AYON_USE_DEV") == "1"
def get_ayon_info(): def get_ayon_info():
executable_args = get_ayon_launcher_args() executable_args = get_ayon_launcher_args()
if is_running_from_build(): if is_running_from_build():