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.
This commit is contained in:
John Chilton
2014-09-22 20:01:05 -04:00
parent 8d3c2569ea
commit 824eb5b92b
2 changed files with 4 additions and 4 deletions
-4
View File
@@ -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', '.' )
+4
View File
@@ -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' )