From f557ae99506ae39fbe81073f89ea0b8f52502c86 Mon Sep 17 00:00:00 2001 From: Ben Kurtovic Date: Mon, 19 Dec 2016 21:53:11 -0500 Subject: [PATCH] add wsgi --- README.md | 3 ++- calefaction/eve/esi.py | 2 ++ requirements.txt | 1 + uwsgi.ini | 8 ++++++++ 4 files changed, 13 insertions(+), 1 deletion(-) create mode 100644 uwsgi.ini diff --git a/README.md b/README.md index e4fe31e..ba952db 100644 --- a/README.md +++ b/README.md @@ -29,4 +29,5 @@ Guide ### Deploy - ... + uwsgi --ini uwsgi.ini + # proxy to 127.0.0.1:9001 diff --git a/calefaction/eve/esi.py b/calefaction/eve/esi.py index f370068..7ac7672 100644 --- a/calefaction/eve/esi.py +++ b/calefaction/eve/esi.py @@ -68,6 +68,8 @@ class EVESwaggerInterface: Return the JSON result, if any. Raise EVEAPIError for any errors. """ + ... # cache requests + params = {"datasource": self._data_source} headers = { "Accept": "application/json", diff --git a/requirements.txt b/requirements.txt index 74fd9f0..921a6ae 100644 --- a/requirements.txt +++ b/requirements.txt @@ -2,3 +2,4 @@ Flask==0.11.1 Flask-Mako==0.4 PyYAML==3.12 requests==2.12.4 +uWSGI==2.0.14 diff --git a/uwsgi.ini b/uwsgi.ini new file mode 100644 index 0000000..55005b7 --- /dev/null +++ b/uwsgi.ini @@ -0,0 +1,8 @@ +[uwsgi] +socket = 127.0.0.1:9001 +wsgi-file = app.py +callable = app +virtualenv = venv +processes = 1 +threads = 4 +stats = 127.0.0.1:9002