From 3d5075af5f12769652c3c50b5ef4b576bd99e40d Mon Sep 17 00:00:00 2001 From: Martin Bornhold Date: Wed, 10 Aug 2016 16:53:23 +0200 Subject: [PATCH] config: Fix settings for celery tasks. --- rhodecode/__init__.py | 4 ++++ rhodecode/config/environment.py | 3 +++ 2 files changed, 7 insertions(+) diff --git a/rhodecode/__init__.py b/rhodecode/__init__.py index dc034be1..b4c66f8c 100644 --- a/rhodecode/__init__.py +++ b/rhodecode/__init__.py @@ -43,6 +43,10 @@ CELERY_EAGER = False # link to config for pylons CONFIG = {} +# Populated with the settings dictionary from application init in +# rhodecode.conf.environment.load_pyramid_environment +PYRAMID_SETTINGS = {} + # Linked module for extensions EXTENSIONS = {} diff --git a/rhodecode/config/environment.py b/rhodecode/config/environment.py index 924c8f99..45828976 100644 --- a/rhodecode/config/environment.py +++ b/rhodecode/config/environment.py @@ -145,6 +145,9 @@ def load_pyramid_environment(global_config, settings): settings_merged = global_config.copy() settings_merged.update(settings) + # Store the settings to make them available to other modules. + rhodecode.PYRAMID_SETTINGS = settings_merged + # If this is a test run we prepare the test environment like # creating a test database, test search index and test repositories. # This has to be done before the database connection is initialized.