Skip to content

Instantly share code, notes, and snippets.

@miyataken999
Last active September 13, 2018 21:30
Show Gist options
  • Save miyataken999/914bb4337da56b779badeceea217d6f7 to your computer and use it in GitHub Desktop.
Save miyataken999/914bb4337da56b779badeceea217d6f7 to your computer and use it in GitHub Desktop.
processmaker mysql から websock ref: https://qiita.com/miyataken999/items/fefcd5fef7f89e440814
BEGIN
set @word = casea;
set @cmd = concat('import websocket
if __name__ == "__main__":
websocket.enableTrace(True)
ws = websocket.create_connection("wss://***.***.***.***:9000")
ws.send("',@word,'")
result = ws.recv()
print(result)
ws.close()');
     select sys_eval(concat("python3 -c '",@cmd,"'>/dev/null 2>&1 ")) into @d;
RETURN 0;
END
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment