Created
April 9, 2013 09:27
-
-
Save Lothiraldan/5344339 to your computer and use it in GitHub Desktop.
How to make gunicorn timeout with a simple app?
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import requests | |
from flask import Flask | |
app = Flask(__name__) | |
app.debug=True | |
@app.route("/hello") | |
def world(): | |
return "Hello world" | |
@app.route("/") | |
def hello(): | |
return requests.get('http://127.0.0.1:8000/hello').text | |
if __name__ == "__main__": | |
app.run(debug=True) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
gunicorn --debug app:app |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment