Revert gevent

This commit is contained in:
Guy Van Sanden 2025-02-04 19:17:29 +01:00
parent 79bdc2c65d
commit 4d5d2b96bc

View File

@ -28,11 +28,13 @@ def sendmessage(target, message):
json_command = json.dumps(command)
""" Connects to WebSocket server, sends a message, and returns the response """
uri = "ws://localhost:5080"
ws = websocket.create_connection(uri) # Blocking WebSocket connection
ws.send(json_command) # Send message to WebSocket
response = ws.recv() # Receive response
# ws.close() # Close WebSocket connection
print(response)
ws.close()
return response
@app.route("/webhook/<id>", methods=['POST'])