mirror of
https://github.com/jumpserver/jumpserver.git
synced 2025-08-09 10:08:26 +00:00
perf: core celery always active
This commit is contained in:
parent
a11097fb5a
commit
a534c496d0
@ -96,9 +96,9 @@ class Terminal(StorageMixin, TerminalStatusMixin, JMSBaseModel):
|
|||||||
|
|
||||||
@property
|
@property
|
||||||
def is_active(self):
|
def is_active(self):
|
||||||
if self.user and self.user.is_active:
|
user_active = self.user and self.user.is_active
|
||||||
return True
|
type_active = self.type in [TypeChoices.core, TypeChoices.celery]
|
||||||
return False
|
return user_active or type_active
|
||||||
|
|
||||||
@is_active.setter
|
@is_active.setter
|
||||||
def is_active(self, active):
|
def is_active(self, active):
|
||||||
|
Loading…
Reference in New Issue
Block a user