diff --git a/cms/envs/edly-trial.py b/cms/envs/edly-trial.py index e84458018395..a23593dbc654 100644 --- a/cms/envs/edly-trial.py +++ b/cms/envs/edly-trial.py @@ -71,6 +71,13 @@ QUEUE_VARIANT = CONFIG_PREFIX.lower() + +############# NON-SECURE ENV CONFIG ############################## +# Things like server locations, ports, etc. +with open(CONFIG_ROOT / CONFIG_PREFIX + "env.json") as env_file: + ENV_TOKENS = json.load(env_file) + + # Append Customer Name identifier in all celery queues names and celery default exchange ENV_CUSTOMER_NAME = ENV_TOKENS.get('CUSTOMER_NAME_IDENTIFIER', None) CUSTOMER_NAME = ENV_CUSTOMER_NAME + "." if ENV_CUSTOMER_NAME else "".lower() @@ -91,10 +98,7 @@ CELERY_ROUTES = "{}celery.Router".format(QUEUE_VARIANT) -############# NON-SECURE ENV CONFIG ############################## -# Things like server locations, ports, etc. -with open(CONFIG_ROOT / CONFIG_PREFIX + "env.json") as env_file: - ENV_TOKENS = json.load(env_file) + # Do NOT calculate this dynamically at startup with git because it's *slow*. EDX_PLATFORM_REVISION = ENV_TOKENS.get('EDX_PLATFORM_REVISION', EDX_PLATFORM_REVISION) diff --git a/lms/envs/edly-trial.py b/lms/envs/edly-trial.py index 8f65982c0815..b69a68dc7f55 100644 --- a/lms/envs/edly-trial.py +++ b/lms/envs/edly-trial.py @@ -86,6 +86,13 @@ QUEUE_VARIANT = CONFIG_PREFIX.lower() +########################## NON-SECURE ENV CONFIG ############################## +# Things like server locations, ports, etc. + +with open(CONFIG_ROOT / CONFIG_PREFIX + "env.json") as env_file: + ENV_TOKENS = json.load(env_file) + + # Append Customer Name identifier in all celery queues names and celery default exchange ENV_CUSTOMER_NAME = ENV_TOKENS.get('CUSTOMER_NAME_IDENTIFIER', None) CUSTOMER_NAME = ENV_CUSTOMER_NAME + "." if ENV_CUSTOMER_NAME else "".lower() @@ -108,12 +115,6 @@ CELERY_ROUTES = "{}celery.Router".format(QUEUE_VARIANT) CELERYBEAT_SCHEDULE = {} # For scheduling tasks, entries can be added to this dict -########################## NON-SECURE ENV CONFIG ############################## -# Things like server locations, ports, etc. - -with open(CONFIG_ROOT / CONFIG_PREFIX + "env.json") as env_file: - ENV_TOKENS = json.load(env_file) - # Authorizenet payment processor set a cookie for dashboard to show pending course purchased dashoard # notification. This cookie domain will be used to set and delete that cookie. ECOMMERCE_COOKIE_DOMAIN = ENV_TOKENS.get('ECOMMERCE_COOKIE_DOMAIN', None)