# HG changeset patch # User Martin Bornhold # Date 2016-08-10 14:53:23 # Node ID 1a04368475b17bbcc9551e06e19f54f0eea27a62 # Parent 46bacf9f350e08fd8d98d5f3f86aa25deb08f3cb config: Fix settings for celery tasks. diff --git a/rhodecode/__init__.py b/rhodecode/__init__.py --- 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 --- a/rhodecode/config/environment.py +++ b/rhodecode/config/environment.py @@ -145,6 +145,9 @@ def load_pyramid_environment(global_conf 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.