Skip to content

Commit

Permalink
Adopted GRPC MQTT connector for remote configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
imbeacon committed Mar 4, 2024
1 parent 3dce938 commit fee9748
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions thingsboard_gateway/grpc_connectors/mqtt/mqtt_connector.py
Original file line number Diff line number Diff line change
Expand Up @@ -157,10 +157,13 @@ def __init__(self, connector_config: str, config_dir_path: str):
self._on_message_thread.start()

def load_handlers(self, handler_flavor, mandatory_keys, accepted_handlers_list):
if handler_flavor not in self.__config:
config = self.__config.get(handler_flavor, [])
if self.__config.get("requestsMapping") is not None:
config = self.__config["requestsMapping"].get(handler_flavor, [])
if handler_flavor not in config:
log.error("'%s' section missing from configuration", handler_flavor)
else:
for handler in self.__config.get(handler_flavor):
for handler in config:
discard = False

for key in mandatory_keys:
Expand Down

0 comments on commit fee9748

Please sign in to comment.