mirror of
https://github.com/projecthorus/sondehub-infra.git
synced 2025-02-06 10:49:13 +00:00
fix for crt error
This commit is contained in:
parent
e9f9ba7084
commit
7aaa1f93b8
2
main.tf
2
main.tf
@ -492,7 +492,7 @@ resource "aws_elasticsearch_domain" "ElasticsearchDomain" {
|
|||||||
dedicated_master_enabled = true
|
dedicated_master_enabled = true
|
||||||
dedicated_master_type = "t3.small.elasticsearch"
|
dedicated_master_type = "t3.small.elasticsearch"
|
||||||
instance_count = 2
|
instance_count = 2
|
||||||
instance_type = "t3.small.elasticsearch"
|
instance_type = "m5.large.elasticsearch"
|
||||||
zone_awareness_enabled = true
|
zone_awareness_enabled = true
|
||||||
}
|
}
|
||||||
cognito_options {
|
cognito_options {
|
||||||
|
@ -7,6 +7,7 @@ import functools
|
|||||||
from aws_xray_sdk.core import xray_recorder
|
from aws_xray_sdk.core import xray_recorder
|
||||||
from aws_xray_sdk.core import patch_all
|
from aws_xray_sdk.core import patch_all
|
||||||
from awscrt import io, mqtt, auth, http
|
from awscrt import io, mqtt, auth, http
|
||||||
|
from awscrt.exceptions import AwsCrtError
|
||||||
from awsiot import mqtt_connection_builder
|
from awsiot import mqtt_connection_builder
|
||||||
import uuid
|
import uuid
|
||||||
import threading
|
import threading
|
||||||
@ -79,7 +80,7 @@ def lambda_handler(event, context):
|
|||||||
qos=mqtt.QoS.AT_MOST_ONCE)
|
qos=mqtt.QoS.AT_MOST_ONCE)
|
||||||
try:
|
try:
|
||||||
msg.result()
|
msg.result()
|
||||||
except RuntimeError:
|
except (RuntimeError, AwsCrtError):
|
||||||
mqtt_connection = mqtt_connection_builder.websockets_with_default_aws_signing(
|
mqtt_connection = mqtt_connection_builder.websockets_with_default_aws_signing(
|
||||||
endpoint="a2sgq5szfqum7p-ats.iot.us-east-1.amazonaws.com",
|
endpoint="a2sgq5szfqum7p-ats.iot.us-east-1.amazonaws.com",
|
||||||
client_bootstrap=client_bootstrap,
|
client_bootstrap=client_bootstrap,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user