From 7ea23e0fccab0bf122e1a7eb10f3f5f82109fc17 Mon Sep 17 00:00:00 2001 From: ibuler Date: Sun, 8 Nov 2015 12:01:08 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E6=97=A0=E6=B3=95=E7=BB=88?= =?UTF-8?q?=E7=BB=93web=E8=BF=9B=E7=A8=8B=E7=9A=84bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- run_websocket.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/run_websocket.py b/run_websocket.py index 18c297ad5..4b8f2f981 100644 --- a/run_websocket.py +++ b/run_websocket.py @@ -29,7 +29,7 @@ import struct, fcntl, signal, socket, select, fnmatch import paramiko from connect import Tty -from connect import TtyLog +from connect import TtyLog, Log try: import simplejson as json @@ -186,11 +186,11 @@ class WebTty(Tty): class WebTerminalKillHandler(tornado.web.RequestHandler): def get(self): ws_id = self.get_argument('id') + Log.objects.filter(id=ws_id).update(is_finished=True) for ws in WebTerminalHandler.clients: print ws.id if ws.id == int(ws_id): print "killed" - ws.log.is_finished = True ws.log.save() ws.close() print len(WebTerminalHandler.clients)