Merge pull request #3107 from jumpserver/bugfix

[Update] 修改避免每次刷新asset user的可连接性
pull/3108/head
老广 2019-08-12 17:42:35 +08:00 committed by GitHub
commit ef73469d5d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 3 deletions

View File

@ -164,9 +164,6 @@ class AssetUser(OrgModelMixin):
def set_asset_connectivity(self, asset, c): def set_asset_connectivity(self, asset, c):
key = self.get_asset_connectivity_key(asset) key = self.get_asset_connectivity_key(asset)
Connectivity.set(key, c) Connectivity.set(key, c)
# 当为某个系统用户或管理用户设置的的时候,失效掉他们的连接数量
amount_key = self.CONNECTIVITY_AMOUNT_CACHE_KEY.format(self.username, '*')
cache.delete_pattern(amount_key)
def get_asset_user(self, asset): def get_asset_user(self, asset):
from ..backends import AssetUserManager from ..backends import AssetUserManager

View File

@ -54,6 +54,9 @@ LOG_LEVEL = CONFIG.LOG_LEVEL
ALLOWED_HOSTS = ['*'] ALLOWED_HOSTS = ['*']
# Max post update field num
DATA_UPLOAD_MAX_NUMBER_FIELDS = 10000
# Application definition # Application definition
INSTALLED_APPS = [ INSTALLED_APPS = [