Handle even larger requests

This commit is contained in:
Dominik Heidler 2016-02-17 02:47:13 +01:00
parent 12b7c75508
commit 0a57b6e5c7
2 changed files with 4 additions and 3 deletions

View File

@ -22,7 +22,7 @@ pip3 install pymongo
location / {
include uwsgi_params;
uwsgi_pass 127.0.0.1:3031;
client_max_body_size 10M;
client_max_body_size 30M;
}
location /tiles {

View File

@ -12,6 +12,7 @@ ac = pyalfred.AlfredConnection()
for req_data_type in CONFIG["fetch_ids"]:
data = {req_data_type: ac.fetch(req_data_type)}
response = requests.post(CONFIG["api_url"], json=data).json()
for data_type, data in response.items():
response = requests.post(CONFIG["api_url"], json=data)
response.raise_for_status()
for data_type, data in response.json().items():
ac.send(int(data_type), data)