mirror of
https://github.com/projecthorus/sondehub-infra.git
synced 2024-12-24 23:36:44 +00:00
stuff and things
This commit is contained in:
parent
4d8fda7441
commit
77673e06b1
8
main.tf
8
main.tf
@ -555,7 +555,7 @@ resource "aws_lambda_function" "get_sondes" {
|
||||
memory_size = 256
|
||||
role = aws_iam_role.IAMRole5.arn
|
||||
runtime = "python3.7"
|
||||
timeout = 10
|
||||
timeout = 30
|
||||
tracing_config {
|
||||
mode = "Active"
|
||||
}
|
||||
@ -579,7 +579,7 @@ resource "aws_lambda_function" "listeners" {
|
||||
memory_size = 256
|
||||
role = aws_iam_role.IAMRole5.arn
|
||||
runtime = "python3.7"
|
||||
timeout = 10
|
||||
timeout = 30
|
||||
tracing_config {
|
||||
mode = "Active"
|
||||
}
|
||||
@ -604,7 +604,7 @@ resource "aws_lambda_function" "datanew" {
|
||||
memory_size = 256
|
||||
role = aws_iam_role.IAMRole5.arn
|
||||
runtime = "python3.7"
|
||||
timeout = 10
|
||||
timeout = 30
|
||||
tracing_config {
|
||||
mode = "Active"
|
||||
}
|
||||
@ -628,7 +628,7 @@ resource "aws_lambda_function" "predictions" {
|
||||
memory_size = 256
|
||||
role = aws_iam_role.IAMRole5.arn
|
||||
runtime = "python3.7"
|
||||
timeout = 10
|
||||
timeout = 30
|
||||
tracing_config {
|
||||
mode = "Active"
|
||||
}
|
||||
|
@ -246,7 +246,7 @@ def datanew(event, context):
|
||||
"aggs": {
|
||||
"1": {
|
||||
"top_hits": {
|
||||
"size": 1,
|
||||
"size": 5,
|
||||
"sort": [{"datetime": {"order": "desc"}}],
|
||||
}
|
||||
}
|
||||
@ -289,7 +289,14 @@ def datanew(event, context):
|
||||
for frame in sonde["3"]["buckets"]:
|
||||
try:
|
||||
frame_data = frame["1"]["hits"]["hits"][0]["_source"]
|
||||
|
||||
uploaders = {
|
||||
x["_source"]['uploader_callsign'] : {
|
||||
"snr" : x["_source"]["snr"] if "snr" in x["_source"] else None,
|
||||
"rssi" : x["_source"]["rssi"] if "rssi" in x["_source"] else None
|
||||
}
|
||||
for x in frame["1"]["hits"]["hits"]
|
||||
}
|
||||
|
||||
# Use subtype if it exists, else just use the basic type.
|
||||
if "subtype" in frame_data:
|
||||
_type = frame_data["subtype"]
|
||||
@ -344,7 +351,7 @@ def datanew(event, context):
|
||||
"picture": "",
|
||||
"temp_inside": "",
|
||||
"data": data,
|
||||
"callsign": frame_data["uploader_callsign"],
|
||||
"callsign": uploaders,
|
||||
"sequence": "0",
|
||||
}
|
||||
)
|
||||
@ -576,7 +583,8 @@ if __name__ == "__main__":
|
||||
"type" : "positions",
|
||||
"mode": "6hours",
|
||||
"position_id": "0",
|
||||
"chase_only": "true"
|
||||
"chase_only": "false",
|
||||
"vehicles": "17008547"
|
||||
}
|
||||
},
|
||||
{},
|
||||
|
Loading…
Reference in New Issue
Block a user