Skip to content

Commit

Permalink
Added ability to configure parameter maxPayloadSizeBytes in order to …
Browse files Browse the repository at this point in the history
…limit size from the gateway to ThingsBoard
  • Loading branch information
imbeacon committed Sep 30, 2021
1 parent e75abde commit 758db25
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion thingsboard_gateway/gateway/tb_gateway_service.py
Original file line number Diff line number Diff line change
Expand Up @@ -416,7 +416,7 @@ def __send_to_storage(self):
log.error(e)

def check_size(self, size, devices_data_in_event_pack):
if size >= 48000:
if size >= self.__config["thingsboard"].get("maxPayloadSizeBytes", 4096):
self.__send_data(devices_data_in_event_pack)
size = 0
return size
Expand Down

0 comments on commit 758db25

Please sign in to comment.