Merge "Add wsgi module"
This commit is contained in:
commit
d8d4d94383
@ -19,5 +19,9 @@
|
|||||||
See http://pecan.readthedocs.org/en/latest/deployment.html for details.
|
See http://pecan.readthedocs.org/en/latest/deployment.html for details.
|
||||||
"""
|
"""
|
||||||
from aodh.api import app
|
from aodh.api import app
|
||||||
|
import warnings
|
||||||
|
|
||||||
|
|
||||||
|
warnings.warn('Using app.wsgi is deprecated. Use aodh.wsgi.api instead')
|
||||||
|
|
||||||
application = app.build_wsgi_app(argv=[])
|
application = app.build_wsgi_app(argv=[])
|
||||||
|
0
aodh/wsgi/__init__.py
Normal file
0
aodh/wsgi/__init__.py
Normal file
22
aodh/wsgi/api.py
Normal file
22
aodh/wsgi/api.py
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
# Licensed under the Apache License, Version 2.0 (the "License"); you may
|
||||||
|
# not use this file except in compliance with the License. You may obtain
|
||||||
|
# a copy of the License at
|
||||||
|
#
|
||||||
|
# http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
#
|
||||||
|
# Unless required by applicable law or agreed to in writing, software
|
||||||
|
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||||
|
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||||
|
# License for the specific language governing permissions and limitations
|
||||||
|
# under the License.
|
||||||
|
"""WSGI application entry-point for Aodh API."""
|
||||||
|
|
||||||
|
import threading
|
||||||
|
|
||||||
|
from aodh.api import app
|
||||||
|
|
||||||
|
|
||||||
|
application = None
|
||||||
|
with threading.Lock():
|
||||||
|
if application is None:
|
||||||
|
application = app.build_wsgi_app(argv=[])
|
@ -11,7 +11,7 @@ AODH_DIR=$DEST/aodh
|
|||||||
AODH_CONF_DIR=/etc/aodh
|
AODH_CONF_DIR=/etc/aodh
|
||||||
AODH_CONF=$AODH_CONF_DIR/aodh.conf
|
AODH_CONF=$AODH_CONF_DIR/aodh.conf
|
||||||
AODH_UWSGI_CONF=$AODH_CONF_DIR/aodh-uwsgi.ini
|
AODH_UWSGI_CONF=$AODH_CONF_DIR/aodh-uwsgi.ini
|
||||||
AODH_UWSGI=$AODH_DIR/aodh/api/app.wsgi
|
AODH_UWSGI=aodh.wsgi.api:application
|
||||||
|
|
||||||
# Set up database backend
|
# Set up database backend
|
||||||
AODH_BACKEND=${AODH_BACKEND:-mysql}
|
AODH_BACKEND=${AODH_BACKEND:-mysql}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user