Test threading lock

This commit is contained in:
Guy Van Sanden 2025-02-12 11:16:09 +01:00
parent 38d9e87393
commit 06744aa5c7

View File

@ -32,7 +32,10 @@ def sendmessage(target, message):
ws = websocket.create_connection(uri) # Blocking WebSocket connection ws = websocket.create_connection(uri) # Blocking WebSocket connection
ws.send(json_command) # Send message to WebSocket ws.send(json_command) # Send message to WebSocket
response = ws.recv() # Receive response response = ws.recv() # Receive response
print("Message %s sent over websocket to %s" % (message, target)) chatitems = response['resp']['chatitems']
for chatitem in chatitems:
print(chatitem)
# print("Message %s sent over websocket to %s" % (chatitem['content'], target))
# ws.close() # Close WebSocket connection # ws.close() # Close WebSocket connection
# print(response) # print(response)
ws.close() ws.close()