aboutsummaryrefslogtreecommitdiffstats
path: root/fg21sim/webui/handlers
diff options
context:
space:
mode:
authorAaron LI <aaronly.me@outlook.com>2016-11-17 19:23:01 +0800
committerAaron LI <aaronly.me@outlook.com>2016-11-17 19:23:01 +0800
commit52bd308911c62d5f79b09479c651afe44f988a75 (patch)
tree68f4c2be57f34e085b4bd14187948fbceecd13c7 /fg21sim/webui/handlers
parent73010f9fd19ff6763422fc5779f2915dca0fe190 (diff)
downloadfg21sim-52bd308911c62d5f79b09479c651afe44f988a75.tar.bz2
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
Diffstat (limited to 'fg21sim/webui/handlers')
-rw-r--r--fg21sim/webui/handlers/websocket.py4
1 files changed, 2 insertions, 2 deletions
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):