feat(routes/api.py): support mulitple clients correctly
This commit is contained in:
@@ -52,9 +52,10 @@ def emit_polled_data(app, socketio):
|
||||
import time
|
||||
|
||||
while True:
|
||||
data = {}
|
||||
for client_id in backend.clients.keys():
|
||||
data = backend.get_client_data(client_id)
|
||||
socketio.emit("update_data", {client_id: data})
|
||||
data[client_id] = backend.get_client_data(client_id)
|
||||
socketio.emit("update_data", data)
|
||||
|
||||
time.sleep(1)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user