From 2a86c3a376e74c4525bc8e5167b8cbabd2eeccd3 Mon Sep 17 00:00:00 2001 From: xinwen Date: Tue, 29 Sep 2020 11:03:31 +0800 Subject: [PATCH] =?UTF-8?q?fix(perms):=20=E5=AE=8C=E5=96=84=E6=A3=80?= =?UTF-8?q?=E6=9F=A5=E8=B5=84=E4=BA=A7=E6=8E=88=E6=9D=83=E8=BF=87=E6=9C=9F?= =?UTF-8?q?=E7=9A=84celery=20task?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/jumpserver/conf.py | 2 +- apps/perms/tasks.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/jumpserver/conf.py b/apps/jumpserver/conf.py index 3e0b65172..d5bff1819 100644 --- a/apps/jumpserver/conf.py +++ b/apps/jumpserver/conf.py @@ -257,7 +257,7 @@ class Config(dict): 'SYSLOG_FACILITY': 'user', 'SYSLOG_SOCKTYPE': 2, 'PERM_SINGLE_ASSET_TO_UNGROUP_NODE': False, - 'PERM_EXPIRED_CHECK_PERIODIC': 60, + 'PERM_EXPIRED_CHECK_PERIODIC': 60 * 60, 'WINDOWS_SSH_DEFAULT_SHELL': 'cmd', 'FLOWER_URL': "127.0.0.1:5555", 'DEFAULT_ORG_SHOW_ALL_USERS': True, diff --git a/apps/perms/tasks.py b/apps/perms/tasks.py index fb871d16e..db89844c6 100644 --- a/apps/perms/tasks.py +++ b/apps/perms/tasks.py @@ -44,7 +44,7 @@ def check_asset_permission_expired(): date_expired__gt=start, date_expired__lt=end ).distinct().values_list('id', flat=True) logger.info(f'>>> checking {start} to {end} have {ids} expired') - dispatch_process_expired_asset_permission.delay(ids) + dispatch_process_expired_asset_permission.delay(list(ids)) @shared_task(queue='node_tree')