mirror of
https://github.com/daniviga/bite.git
synced 2024-12-23 08:41:24 +01:00
Use shared subscription
This commit is contained in:
parent
2a443815b0
commit
32b6350c35
@ -32,7 +32,8 @@ class Command(BaseCommand):
|
||||
|
||||
async def mqtt_broker(self):
|
||||
async with Client(MQTT_HOST, port=MQTT_PORT) as client:
|
||||
await client.subscribe("#")
|
||||
# use shared subscription for HA/balancing
|
||||
await client.subscribe("$share/telemetry/#")
|
||||
async with client.unfiltered_messages() as messages:
|
||||
async for message in messages:
|
||||
payload = json.loads(message.payload.decode('utf-8'))
|
||||
|
Loading…
Reference in New Issue
Block a user