fix(perms): 完善检查资产授权过期的celery task

pull/4735/head
xinwen 2020-09-29 11:03:31 +08:00 committed by 老广
parent 5558e854de
commit 2a86c3a376
2 changed files with 2 additions and 2 deletions

View File

@ -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,

View File

@ -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')