JSON parse
Build and Push Docker Image / build-and-push (push) Successful in 15s

This commit is contained in:
ciomek committed 2026-08-16 13:23:26 +02:00
1 parent d38015562a
commit 8fbc7fed7d
8 files changed
+10 -29

No files matched your search

+1 -6
View File
@@ -3,15 +3,10 @@ import json
from loon.web.users.state import user_threads
async def server_handler(client, userdata, msg):
async def server_handler(client, userdata, msg, data):
if msg.topic != "loon/server/info":
return
try:
data = json.loads(msg.payload.decode())
except json.JSONDecodeError:
return
envelope = json.dumps({"topic": "server/info", "payload": data})
for queue in list(user_threads.values()):