missing size=0 likely causing more traffic from ES than required

This commit is contained in:
Michaela Wheeler 2021-12-23 07:14:29 +11:00
parent 683c121054
commit f52ae68389
2 changed files with 12 additions and 10 deletions

View File

@ -8,6 +8,7 @@ import es
def get_sondes(event, context):
path = "telm-*/_search"
payload = {
"size": 0,
"aggs": {
"2": {
"terms": {
@ -253,6 +254,7 @@ def get_listener_telemetry(event, context):
path = "listeners-*/_search"
payload = {
"size": 0,
"timeout": "30s",
"aggs": {
"2": {

View File

@ -1,6 +1,6 @@
from . import *
#print(get_sondes({"queryStringParameters":{"lat":"-32.7933","lon":"151.8358","distance":"5000", "last":"604800"}}, {}))
print(get_listener_telemetry({"queryStringParameters":{}}, {}))
# mode: 6hours
# type: positions
# format: json
@ -20,16 +20,16 @@ from . import *
# )
# )
# print(get_sites({},{}))
print(
get_telem(
{
"queryStringParameters": {
"duration": "1d",
# "serial": "S4430086"
}},{}
# print(
# get_telem(
# {
# "queryStringParameters": {
# "duration": "1d",
# # "serial": "S4430086"
# }},{}
)
)
# )
# )
# print (
# get_chase(
# {"queryStringParameters": {