Merge "Fix GMR feature not actually enabled"
This commit is contained in:
@@ -86,6 +86,6 @@ def app_factory(global_config, **local_conf):
|
|||||||
|
|
||||||
|
|
||||||
def build_wsgi_app(argv=None):
|
def build_wsgi_app(argv=None):
|
||||||
conf = service.prepare_service(argv=argv)
|
conf = service.prepare_service(argv=argv, with_gmr=False)
|
||||||
conf.log_opt_values(LOG, log.DEBUG)
|
conf.log_opt_values(LOG, log.DEBUG)
|
||||||
return load_app(conf)
|
return load_app(conf)
|
||||||
|
@@ -74,7 +74,7 @@ LISTENER_OPTS = [
|
|||||||
]
|
]
|
||||||
|
|
||||||
|
|
||||||
def prepare_service(argv=None, config_files=None):
|
def prepare_service(argv=None, config_files=None, with_gmr=True):
|
||||||
conf = cfg.ConfigOpts()
|
conf = cfg.ConfigOpts()
|
||||||
oslo_i18n.enable_lazy()
|
oslo_i18n.enable_lazy()
|
||||||
log.register_options(conf)
|
log.register_options(conf)
|
||||||
@@ -108,9 +108,9 @@ def prepare_service(argv=None, config_files=None):
|
|||||||
ka_loading.load_auth_from_conf_options(conf, "service_credentials")
|
ka_loading.load_auth_from_conf_options(conf, "service_credentials")
|
||||||
log.setup(conf, 'aodh')
|
log.setup(conf, 'aodh')
|
||||||
|
|
||||||
# NOTE(tkajinam): guru cannot run with service under apache daemon, so when
|
# NOTE(tkajinam): disable GMR when app is run by mod_wsgi/uwsgi because
|
||||||
# aod-api running with mod_wsgi, the argv is [], we don't start guru.
|
# signal handler can't be installed.
|
||||||
if argv:
|
if with_gmr:
|
||||||
gmr_opts.set_defaults(conf)
|
gmr_opts.set_defaults(conf)
|
||||||
gmr.TextGuruMeditation.setup_autorun(version, conf=conf)
|
gmr.TextGuruMeditation.setup_autorun(version, conf=conf)
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user