add gunicorn capabilities
This commit is contained in:
parent
94d51c52be
commit
bd12718981
7
app.py
7
app.py
@ -15,4 +15,9 @@ def index():
|
|||||||
return jsonify(count=out)
|
return jsonify(count=out)
|
||||||
|
|
||||||
|
|
||||||
app.run(host="0.0.0.0", port=int("8080"), debug=False)
|
if __name__ != '__main__':
|
||||||
|
import logging
|
||||||
|
|
||||||
|
gunicorn_logger = logging.getLogger('gunicorn.error')
|
||||||
|
app.logger.handlers = gunicorn_logger.handlers
|
||||||
|
app.logger.setLevel(gunicorn_logger.level)
|
||||||
|
Loading…
Reference in New Issue
Block a user