From 824eb5b92b5788a176cbc60e8c85bdb70beef48b Mon Sep 17 00:00:00 2001 From: John Chilton Date: Mon, 22 Sep 2014 20:01:05 -0400 Subject: [PATCH] Continue flailing on environment variable configuraiton of Galaxy. Expand variables earlier right in app_factory so middleware, etc... pick up defaults/overrrides. In particular GALAXY_CONFIG_OVERRIDE_DEBUG should now work properly. GALAXY_CONFIG_DEBUG cannot be used because the sample config template overrides debug's default. Thanks to Bjoern for the bug report. --- lib/galaxy/config.py | 4 ---- lib/galaxy/webapps/galaxy/buildapp.py | 4 ++++ 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/galaxy/config.py b/lib/galaxy/config.py index bea6d458c7e..8a2040f22c4 100644 --- a/lib/galaxy/config.py +++ b/lib/galaxy/config.py @@ -13,7 +13,6 @@ import logging.config import ConfigParser from datetime import timedelta from galaxy.web.formatting import expand_pretty_datetime_format -from galaxy.util.properties import load_app_properties from galaxy.util import string_as_bool from galaxy.util import listify from galaxy.util.dbkeys import GenomeBuilds @@ -37,9 +36,6 @@ class Configuration( object ): deprecated_options = ( 'database_file', ) def __init__( self, **kwargs ): - kwargs = load_app_properties( - kwds=kwargs - ) self.config_dict = kwargs self.root = kwargs.get( 'root_dir', '.' ) diff --git a/lib/galaxy/webapps/galaxy/buildapp.py b/lib/galaxy/webapps/galaxy/buildapp.py index ab1bd91fee0..92125d974ff 100644 --- a/lib/galaxy/webapps/galaxy/buildapp.py +++ b/lib/galaxy/webapps/galaxy/buildapp.py @@ -19,6 +19,7 @@ import galaxy.web.framework import galaxy.web.framework.webapp from galaxy import util from galaxy.util import asbool +from galaxy.util.properties import load_app_properties import logging log = logging.getLogger( __name__ ) @@ -31,6 +32,9 @@ def app_factory( global_conf, **kwargs ): """ Return a wsgi application serving the root object """ + kwargs = load_app_properties( + kwds=kwargs + ) # Create the Galaxy application unless passed in if 'app' in kwargs: app = kwargs.pop( 'app' )