Update config overhaul branch for introduction of galaxy.web.stack package.

This commit is contained in:
John Chilton
2017-08-10 13:15:31 -04:00
parent 539a62f642
commit 98ca8ce7a6
2 changed files with 12 additions and 14 deletions
+10 -14
View File
@@ -27,7 +27,6 @@ from galaxy.exceptions import MessageException
from galaxy import util
from galaxy.util import asbool
from galaxy.util import safe_str_cmp
from galaxy.util.postfork import process_is_uwsgi
from galaxy.util.sanitize_html import sanitize_html
from galaxy.managers import context
@@ -959,21 +958,18 @@ def build_native_uwsgi_app( paste_factory, config_section ):
"""uwsgi can load paste factories with --ini-paste, but this builds non-paste uwsgi apps.
In particular these are useful with --yaml or --json for config."""
if not process_is_uwsgi:
import uwsgi
uwsgi_opt = uwsgi.opt
config_file = uwsgi_opt.get("yaml") or uwsgi_opt.get("json")
if not config_file:
# Probably loaded via --ini-paste - expect paste app.
return None
else:
import uwsgi
uwsgi_opt = uwsgi.opt
config_file = uwsgi_opt.get("yaml") or uwsgi_opt.get("json")
if not config_file:
# Probably loaded via --ini-paste - expect paste app.
return None
uwsgi_app = paste_factory(uwsgi.opt, load_app_kwds={
"config_file": config_file,
"config_section": config_section,
})
return uwsgi_app
uwsgi_app = paste_factory(uwsgi.opt, load_app_kwds={
"config_file": config_file,
"config_section": config_section,
})
return uwsgi_app
def build_url_map( app, global_conf, local_conf ):
+2
View File
@@ -157,6 +157,8 @@ def paste_app_factory( global_conf, **kwargs ):
def uwsgi_app_factory():
# TODO: synchronize with galaxy.web.framework.webapp.build_native_uwsgi_app - should
# at least be using nice_config_parser for instance.
import uwsgi
root = os.path.abspath(uwsgi.opt.get('galaxy_root', os.getcwd()))
config_file = uwsgi.opt.get('galaxy_config_file', os.path.join(root, 'config', 'galaxy.ini'))