From 75c6047236ce969408da583ea6b62f4c28dba17c Mon Sep 17 00:00:00 2001 From: BaiJiangJie Date: Tue, 31 Dec 2019 16:47:25 +0800 Subject: [PATCH] =?UTF-8?q?[Update]=20=E6=B7=BB=E5=8A=A0=E6=B8=85=E9=99=A4?= =?UTF-8?q?=E5=B9=BD=E7=81=B5mysql=E4=BC=9A=E8=AF=9D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/terminal/models.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/terminal/models.py b/apps/terminal/models.py index 1bcb17237..372544510 100644 --- a/apps/terminal/models.py +++ b/apps/terminal/models.py @@ -251,7 +251,7 @@ class Session(OrgModelMixin): return cls.objects.filter(is_finished=False) def is_active(self): - if self.protocol in ['ssh', 'telnet', 'rdp']: + if self.protocol in ['ssh', 'telnet', 'rdp', 'mysql']: key = self.ACTIVE_CACHE_KEY_PREFIX.format(self.id) return bool(cache.get(key)) return True