Revert gevent
This commit is contained in:
parent
79bdc2c65d
commit
4d5d2b96bc
@ -28,11 +28,13 @@ def sendmessage(target, message):
|
|||||||
json_command = json.dumps(command)
|
json_command = json.dumps(command)
|
||||||
|
|
||||||
""" Connects to WebSocket server, sends a message, and returns the response """
|
""" Connects to WebSocket server, sends a message, and returns the response """
|
||||||
|
uri = "ws://localhost:5080"
|
||||||
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
|
||||||
# ws.close() # Close WebSocket connection
|
# ws.close() # Close WebSocket connection
|
||||||
print(response)
|
print(response)
|
||||||
|
ws.close()
|
||||||
return response
|
return response
|
||||||
|
|
||||||
@app.route("/webhook/<id>", methods=['POST'])
|
@app.route("/webhook/<id>", methods=['POST'])
|
||||||
|
Loading…
Reference in New Issue
Block a user