mirror of
https://github.com/projecthorus/sondehub-infra.git
synced 2025-02-20 17:12:50 +00:00
sats fix. full rate on mqtt
This commit is contained in:
parent
7b99bcb94e
commit
97bbffad5b
2
es.tf
2
es.tf
@ -8,7 +8,7 @@ resource "aws_elasticsearch_domain" "ElasticsearchDomain" {
|
||||
dedicated_master_enabled = false
|
||||
dedicated_master_type = "t3.small.elasticsearch"
|
||||
instance_count = 1
|
||||
instance_type = "r5.xlarge.elasticsearch"
|
||||
instance_type = "r6g.large.elasticsearch"
|
||||
zone_awareness_enabled = false
|
||||
}
|
||||
cognito_options {
|
||||
|
@ -162,14 +162,47 @@ def get_telem(event, context):
|
||||
},
|
||||
"query": {
|
||||
"bool": {
|
||||
"minimum_should_match": 1,
|
||||
"must_not": [{"match_phrase": {"software_name": "SondehubV1"}}, {"match_phrase": {"payload_callsign": "xxxxxxxx"}}],
|
||||
"should": [
|
||||
{
|
||||
"bool": {
|
||||
"must": [
|
||||
{
|
||||
"exists": {
|
||||
"field": "sats"
|
||||
}
|
||||
},
|
||||
{
|
||||
"range": {
|
||||
"sats": {
|
||||
"gte": 1,
|
||||
"lt": None
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"bool": {
|
||||
"must_not": [
|
||||
{
|
||||
"exists": {
|
||||
"field": "sats"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
],
|
||||
"filter": [
|
||||
{"match_all": {}},
|
||||
{
|
||||
"range": {
|
||||
"datetime": {"gte": gte.isoformat(), "lt": lt.isoformat()}
|
||||
}
|
||||
},
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
|
@ -3,21 +3,21 @@ import base64
|
||||
|
||||
import zlib
|
||||
|
||||
# response = get_telem(
|
||||
# {
|
||||
# "queryStringParameters":{
|
||||
# # "payload_callsign": "HORUS-V2",
|
||||
# "duration": "3d"
|
||||
# }
|
||||
# }, {})
|
||||
|
||||
response = get_listener_telemetry(
|
||||
response = get_telem(
|
||||
{
|
||||
"queryStringParameters":{
|
||||
# "payload_callsign": "HORUS-V2",
|
||||
"duration": "3h"
|
||||
"duration": "3d"
|
||||
}
|
||||
}, {})
|
||||
|
||||
# response = get_listener_telemetry(
|
||||
# {
|
||||
# "queryStringParameters":{
|
||||
# # "payload_callsign": "HORUS-V2",
|
||||
# "duration": "3h"
|
||||
# }
|
||||
# }, {})
|
||||
compressed = base64.b64decode(response['body'])
|
||||
|
||||
decompressed = (zlib.decompress(compressed, 16 + zlib.MAX_WBITS))
|
||||
|
@ -60,8 +60,7 @@ def lambda_handler(event, context):
|
||||
else:
|
||||
incoming_payloads = decoded
|
||||
|
||||
#send only the first, last and every 5th packet
|
||||
payloads = [incoming_payloads[0]] + incoming_payloads[1:-1:5][1:] + [incoming_payloads[-1]]
|
||||
payloads = incoming_payloads
|
||||
for payload in payloads:
|
||||
|
||||
body = json.dumps(payload)
|
||||
|
Loading…
x
Reference in New Issue
Block a user