Umbau broekr auf client-id
This commit is contained in:
1 parent
268e150f2b
commit
a95204b8d6
17 files changed
+649
-388
No files matched your search
@@ -71,16 +71,16 @@ class HeartbeatManager:
|
||||
|
||||
# Nur authentifizierte Verbindungen erhalten einen Heartbeat.
|
||||
for tenant_id, connections in list(broker.connections.items()):
|
||||
for account_id in list(connections):
|
||||
if not broker.is_authenticated(tenant_id, account_id):
|
||||
for client_id in list(connections):
|
||||
if not broker.is_authenticated(tenant_id, client_id):
|
||||
continue
|
||||
broker.send_to_connection(tenant_id, account_id, msg.to_json())
|
||||
broker.send_to_connection(tenant_id, client_id, msg.to_json())
|
||||
|
||||
# Abgelaufene persistierte Nachrichten und Sitzungs-Queues löschen.
|
||||
# Abgelaufene persistierte Nachrichten und Client-Queues löschen.
|
||||
if self.app is not None:
|
||||
try:
|
||||
with self.app.app_context():
|
||||
broker.cleanup_session_queues()
|
||||
broker.cleanup_client_queues()
|
||||
broker.cleanup_old_messages()
|
||||
except Exception as exc:
|
||||
print(f'Heartbeat cleanup error: {exc}')
|
||||
|
||||
Reference in new issue
Block a user