mirror of
https://github.com/projecthorus/sondehub-infra.git
synced 2025-01-31 07:55:24 +00:00
add debugging for failing request
This commit is contained in:
parent
224ce5c792
commit
30f1cea3de
@ -67,8 +67,11 @@ def get_sondes(event, context):
|
||||
payload["query"]["bool"]["filter"].append(
|
||||
{"range": {"datetime": {"gte": "now-1d", "lte": "now+1m"}}}
|
||||
)
|
||||
|
||||
results = es.request(json.dumps(payload), path, "POST")
|
||||
try:
|
||||
results = es.request(json.dumps(payload), path, "POST")
|
||||
except:
|
||||
print(json.dumps(event))
|
||||
raise
|
||||
buckets = results["aggregations"]["2"]["buckets"]
|
||||
sondes = {
|
||||
bucket["1"]["hits"]["hits"][0]["_source"]["serial"]: bucket["1"]["hits"][
|
||||
|
Loading…
x
Reference in New Issue
Block a user