summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoryvesf <yvesf@pinky.(none)>2010-11-24 22:43:56 +0100
committeryvesf <yvesf@pinky.(none)>2010-11-24 22:43:56 +0100
commit9f105d305dda4a0b53f42c215e866d482b048007 (patch)
tree30e6913e39b29dc1f157071e6292dbe309a4f17c
parentff87c6dcaa65c3b1ac366a0ce05b9d6ecf7445b6 (diff)
downloadbooksearch-9f105d305dda4a0b53f42c215e866d482b048007.tar.gz
booksearch-9f105d305dda4a0b53f42c215e866d482b048007.zip
gunicorn related cleanup
-rw-r--r--web.py2
-rw-r--r--web_proxy.py7
2 files changed, 5 insertions, 4 deletions
diff --git a/web.py b/web.py
index 0ae73bb..505dfed 100644
--- a/web.py
+++ b/web.py
@@ -20,6 +20,7 @@ import subprocess
from compat import str_format
app = flask.Flask("booksearch")
+app.debug = True
index_book = open_dir(u"index", u"book")
index_metadata = open_dir(u"index", u"metadata")
@@ -167,5 +168,4 @@ def log_response(sender, response):
sender.logger.debug('Request context is about to close down. '
'Response: %s', response)
if __name__ == "__main__":
- app.debug = True
app.run(host="0.0.0.0", port=8000)
diff --git a/web_proxy.py b/web_proxy.py
index ec5fd55..903c667 100644
--- a/web_proxy.py
+++ b/web_proxy.py
@@ -34,7 +34,8 @@ class ReverseProxied(object):
return self.app(environ, start_response)
from web import app
+app.debug = True
+app.wsgi_app = ReverseProxied(app.wsgi_app)
+
if __name__ == "__main__":
- app.debug = True
- app.wsgi_app = ReverseProxied(app.wsgi_app)
- app.run(host="0.0.0.0", port=8000)
+ app.run(host="0.0.0.0", port=8000)