mirror of
https://github.com/galaxyproject/galaxy.git
synced 2026-09-24 16:30:27 +08:00
Update config overhaul branch for introduction of galaxy.web.stack package.
This commit is contained in:
@@ -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 ):
|
||||
|
||||
@@ -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'))
|
||||
|
||||
Reference in New Issue
Block a user