Skip to content

Commit

Permalink
add gmr to wsgi
Browse files Browse the repository at this point in the history
best use it with the file_event_handler config of oslo_reports
since using signal handlers is discouraged on wsgi

Change-Id: I81569723adb5ff33076ec96b9ec3216b177379f3
  • Loading branch information
Carthaca committed Mar 31, 2022
1 parent 5ba5963 commit 01446c1
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions manila/wsgi/wsgi.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@

from oslo_config import cfg
from oslo_log import log
from oslo_reports import guru_meditation_report as gmr
from oslo_reports import opts as gmr_opts
from oslo_service import wsgi

# Need to register global_opts
Expand All @@ -30,9 +32,12 @@

def initialize_application():
log.register_options(CONF)
gmr_opts.set_defaults(CONF)
CONF(sys.argv[1:], project="manila", version=version.version_string())
config.verify_share_protocols()
log.setup(CONF, "manila")

gmr.TextGuruMeditation.setup_autorun(version, conf=CONF)
rpc.init(CONF)
service.setup_profiler("manila-api", CONF.host)
return wsgi.Loader(CONF).load_app(name='osapi_share')

0 comments on commit 01446c1

Please sign in to comment.