mirror of
https://github.com/jumpserver/jumpserver.git
synced 2025-06-11 07:54:53 +00:00
[Update] 添加清除幽灵mysql会话
This commit is contained in:
parent
e6c369cfd8
commit
75c6047236
@ -251,7 +251,7 @@ class Session(OrgModelMixin):
|
|||||||
return cls.objects.filter(is_finished=False)
|
return cls.objects.filter(is_finished=False)
|
||||||
|
|
||||||
def is_active(self):
|
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)
|
key = self.ACTIVE_CACHE_KEY_PREFIX.format(self.id)
|
||||||
return bool(cache.get(key))
|
return bool(cache.get(key))
|
||||||
return True
|
return True
|
||||||
|
Loading…
Reference in New Issue
Block a user