From 0a57b6e5c71fb2f614a73ae42fb0509285c94d93 Mon Sep 17 00:00:00 2001 From: Dominik Heidler Date: Wed, 17 Feb 2016 02:47:13 +0100 Subject: [PATCH] Handle even larger requests --- README.md | 2 +- alfred-monitoring-proxy/alfred-monitoring-proxy | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 3fd1370..74affc1 100644 --- a/README.md +++ b/README.md @@ -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 { diff --git a/alfred-monitoring-proxy/alfred-monitoring-proxy b/alfred-monitoring-proxy/alfred-monitoring-proxy index 0ffa147..006268e 100755 --- a/alfred-monitoring-proxy/alfred-monitoring-proxy +++ b/alfred-monitoring-proxy/alfred-monitoring-proxy @@ -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)