From b9f1c57fdd6097e776235c105c58c29f84399523 Mon Sep 17 00:00:00 2001 From: Timotej Lazar Date: Tue, 15 Sep 2015 14:27:27 +0200 Subject: Add handlers for python_{push,pull} requests Will be reimplemented asynchronously. --- server/handlers.py | 2 ++ web/main.js | 10 ++++++++++ 2 files changed, 12 insertions(+) diff --git a/server/handlers.py b/server/handlers.py index e9cf7c8..fb50ff4 100644 --- a/server/handlers.py +++ b/server/handlers.py @@ -197,6 +197,8 @@ incoming_handlers = { 'logout': None, 'activity': Activity(), 'query': Query(), + 'python_push': PythonPush(), + 'python_pull': PythonPull(), 'hint': Hint(), 'test': Test() } diff --git a/web/main.js b/web/main.js index 7f1b2e4..c4c8691 100644 --- a/web/main.js +++ b/web/main.js @@ -132,6 +132,16 @@ var guiHandlers = { sendDataToPython(message).then(session.send, session.end).done(); }, + 'python_push': function actionPythonPush(session, message) { + logger.debug('Received python_push from GUI'); + sendDataToPython(message).then(session.send, session.end).done(); + }, + + 'python_pull': function actionPythonPull(session, message) { + logger.debug('Received python_pull from GUI'); + sendDataToPython(message).then(session.send, session.end).done(); + }, + 'hint': function actionHint(session, message) { logger.debug('Received hint from GUI'); sendDataToPython(message).then(session.send, session.end).done(); -- cgit v1.2.1