Merge mqtt backend and plugin #320

Merged
blacklight merged 21 commits from 315/merge-mqtt-backend-and-plugin into master 2023-09-17 02:51:48 +02:00
1 changed files with 2 additions and 0 deletions
Showing only changes of commit 4cb5aa7acb - Show all commits

View File

@ -143,6 +143,7 @@ class MqttPlugin(RunnablePlugin):
self._listeners_lock = defaultdict(threading.RLock)
self.listeners: Dict[str, MqttClient] = {} # client_id -> MqttClient map
self.timeout = timeout
self.default_listener = (
self._get_client(
host=host,
@ -188,6 +189,7 @@ class MqttPlugin(RunnablePlugin):
client_hash = hashlib.sha1(
'|'.join(
[
self.__class__.__name__,
host,
str(port),
json.dumps(sorted(topics)),