Merge "Fix WSGI application"

This commit is contained in:
Zuul 2017-10-18 11:40:48 +00:00 committed by Gerrit Code Review
commit b106c01613
2 changed files with 13 additions and 4 deletions

View File

@ -258,7 +258,7 @@ function configure_monasca_log_api_wsgi {
fi
# copy proxy vhost and wsgi helper files
sudo cp $MONASCA_LOG_API_DIR/monasca_log_api/app/wsgi.py $MONASCA_LOG_API_WSGI_DIR/monasca_log_api
sudo cp $MONASCA_LOG_API_BIN_DIR/monasca-log-api-wsgi $MONASCA_LOG_API_WSGI_DIR/monasca_log_api
sudo cp $PLUGIN_FILES/apache-log-api.template $monasca_log_api_apache_conf
sudo sed -e "
s|%PUBLICPORT%|$monasca_log_api_api_port|g;

View File

@ -18,6 +18,15 @@ Use this file for deploying the API under mod_wsgi.
from paste import deploy
base_dir = '/etc/monasca/'
conf = '%slog-api-paste.ini' % base_dir
application = deploy.loadapp('config:%s' % conf)
application = None
def main():
base_dir = '/etc/monasca/'
conf = '%slog-api-paste.ini' % base_dir
app = deploy.loadapp('config:%s' % conf)
return app
if __name__ == '__main__' or __name__.startswith('_mod_wsgi'):
application = main()