Allow mod_wsgi to find application
The refactoring of the wsgi.py file to support uWSGI in devstack unfortunately broke existing WSGI deployments which fail to load the Monasca API with a message like this: Target WSGI script '/monasca-api/monasca_api/api/wsgi.py' does not contain WSGI application 'application'. This change allows mod_wsgi to find the application definition. Change-Id: I9002bdcb4e132495ec639ad3636bdabdd8714e01 Story: 2001919 Task: 23343
This commit is contained in:
parent
9f2e147308
commit
f79049538c
|
@ -21,5 +21,5 @@ from monasca_api.api import server
|
|||
def main():
|
||||
return server.get_wsgi_app(config_base_path='/etc/monasca')
|
||||
|
||||
if __name__ == '__main__':
|
||||
if __name__ == '__main__' or __name__.startswith('_mod_wsgi'):
|
||||
application = main()
|
||||
|
|
Loading…
Reference in New Issue