From 2f34d42df2ed6dc31781bde3eca62d3a55634c66 Mon Sep 17 00:00:00 2001 From: Michaela Date: Fri, 9 Apr 2021 17:30:01 +1000 Subject: [PATCH] remove mobile from listeners endpoint --- query/lambda_function.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/query/lambda_function.py b/query/lambda_function.py index db8105d..b7b888b 100644 --- a/query/lambda_function.py +++ b/query/lambda_function.py @@ -489,15 +489,18 @@ def get_listeners(event, context): { "range": { "ts": { - "gte": "now-7d", + "gte": "now-24h", "lte": "now", "format": "strict_date_optional_time", } } }, + ], "should": [], - "must_not": [{"match_phrase": {"type": "SondehubV1"}}], + "must_not": [ + {"match_phrase": {"mobile": "true"}}, + ], } }, } @@ -566,7 +569,7 @@ if __name__ == "__main__": # position_id: 0 # vehicles: RS_*;*chase print( - datanew( + get_listeners( { "queryStringParameters": { "type" : "positions",