Posts

Showing posts from February 5, 2019

Show Event does not work in mysql after insert,Or no data save there

Image
0 I tried to start working with events today. I wrote this : SHOW EVENTS FROM classicmodels; And it only return : No Rows (Why? It should shows shomething) Here is my sample event: CREATE EVENT test_event_02 ON SCHEDULE AT CURRENT_TIMESTAMP + INTERVAL 1 MINUTE ON COMPLETION PRESERVE DO INSERT INTO messages(message,created_at) VALUES('Test MySQL Event 2',NOW()); And my select : SELECT * FROM messages; id message created_at 1 Test MySQL Event 1 2018-11-19 18:21:55 2 Test MySQL Event 2 2018-11-19 18:24:36 mysql mysql-event share | improve this question asked Nov 20 '18 at 2:28

Ubuntu 18.04 LTS, Apache2, Django Channels with WebSocket Issue 404

Image
0 I am now following the Django Channels tutorial to set up a django(2+) project. The link is this https://channels.readthedocs.io/en/latest/tutorial/part_1.html. I stopped before Integrate the Channels library which means I haven't start doing Redis yet. I tried the code locally on my window7 os and it works. I can input the message with it displaying on the chat box. However, when I deployed the project on the server (AWS EC2), it gave the following error WebSocket connection to 'ws://54.186.175.56/ws/chat/lobby/' failed: Error during WebSocket handshake: Unexpected response code: 404 Chat socket closed unexpectedly WebSocket is already in CLOSING or CLOSED state. I assume i may have to make some changes to the .conf file but I don't what I am supposed to do. Any idea? I am using Ubuntu