mirror of https://github.com/jumpserver/jumpserver
fix: 修改判断会话活跃逻辑;不必要判断协议 (#5262)
* fix: 修改判断会话活跃逻辑;不必要判断协议 * fix: 修改导入task问题 Co-authored-by: Bai <bugatti_it@163.com>pull/5265/head
parent
b57453cc3c
commit
a36e6fbf84
|
@ -132,7 +132,7 @@ class Session(OrgModelMixin):
|
|||
return None, e
|
||||
|
||||
if settings.SERVER_REPLAY_STORAGE:
|
||||
from .tasks import upload_session_replay_to_external_storage
|
||||
from ..tasks import upload_session_replay_to_external_storage
|
||||
upload_session_replay_to_external_storage.delay(str(self.id))
|
||||
return name, None
|
||||
|
||||
|
@ -146,10 +146,8 @@ class Session(OrgModelMixin):
|
|||
return cls.objects.filter(is_finished=False)
|
||||
|
||||
def is_active(self):
|
||||
if self.protocol in ['ssh', 'telnet', 'rdp', 'mysql']:
|
||||
key = self.ACTIVE_CACHE_KEY_PREFIX.format(self.id)
|
||||
return bool(cache.get(key))
|
||||
return True
|
||||
key = self.ACTIVE_CACHE_KEY_PREFIX.format(self.id)
|
||||
return bool(cache.get(key))
|
||||
|
||||
@property
|
||||
def command_amount(self):
|
||||
|
|
Loading…
Reference in New Issue