diff --git a/api/grpc_getter.py b/api/grpc_getter.py index 25047b3e..414bd6b9 100644 --- a/api/grpc_getter.py +++ b/api/grpc_getter.py @@ -12,7 +12,10 @@ # Reuse channel and stub as much as possible, see https://grpc.io/docs/guides/performance/ @cache def get_grpc_stub(): - channel = grpc.aio.insecure_channel(f"{os.getenv('DSHOST', 'localhost')}:{os.getenv('DSPORT', '50050')}") + channel = grpc.aio.insecure_channel( + f"{os.getenv('DSHOST', 'localhost')}:{os.getenv('DSPORT', '50050')}", + options=[("grpc.max_receive_message_length ", int(os.getenv("GRPC_MAX_MESSAGE_SIZE", 4096)))], + ) return dstore_grpc.DatastoreStub(channel) diff --git a/ingest/api/main.py b/ingest/api/main.py index eb649002..6293a155 100644 --- a/ingest/api/main.py +++ b/ingest/api/main.py @@ -27,7 +27,7 @@ class Response(BaseModel): "username": os.getenv("MQTT_USERNAME"), "password": os.getenv("MQTT_PASSWORD"), "enable_tls": os.getenv("MQTT_TLS", "False").lower() in ("true", "1", "t"), - "port": os.getenv("MQTT_PORT", 8883), + "port": int(os.getenv("MQTT_PORT", 8883)), }