From 52bd308911c62d5f79b09479c651afe44f988a75 Mon Sep 17 00:00:00 2001 From: Aaron LI Date: Thu, 17 Nov 2016 19:23:01 +0800 Subject: webui: app.py: Add new attributes and an option for ConsoleAJAXHandler * Add new attributes "executor" and "task_status" for "console.py" * Define an option for the "executor" * Rename attribute "ws_clients" to "websockets" * Update docstring and comments --- fg21sim/webui/handlers/websocket.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'fg21sim/webui/handlers') diff --git a/fg21sim/webui/handlers/websocket.py b/fg21sim/webui/handlers/websocket.py index a772aa8..e84c20c 100644 --- a/fg21sim/webui/handlers/websocket.py +++ b/fg21sim/webui/handlers/websocket.py @@ -103,7 +103,7 @@ class WSHandler(tornado.websocket.WebSocketHandler): def open(self): """Invoked when a new WebSocket is opened by the client.""" # Add to the set of current connected clients - self.application.ws_clients.add(self) + self.application.websockets.add(self) logger.info("Added new opened WebSocket client: {0}".format(self)) self.configs = self.application.configmanager # Push current configurations to the client @@ -112,7 +112,7 @@ class WSHandler(tornado.websocket.WebSocketHandler): def on_close(self): """Invoked when a new WebSocket is closed by the client.""" # Remove from the set of current connected clients - self.application.ws_clients.remove(self) + self.application.websockets.remove(self) logger.warning("Removed closed WebSocket client: {0}".format(self)) def broadcast(self, message): -- cgit v1.2.2