mirror of
https://github.com/jumpserver/jumpserver.git
synced 2025-10-26 02:53:35 +00:00
perf: 处理冲突
This commit is contained in:
@@ -9,6 +9,7 @@ from ops.celery.decorator import (
|
||||
)
|
||||
from .models import UserLoginLog, OperateLog, FTPLog, ActivityLog
|
||||
from common.utils import get_log_keep_day
|
||||
from django.utils.translation import gettext_lazy as _
|
||||
|
||||
|
||||
def clean_login_log_period():
|
||||
@@ -39,8 +40,8 @@ def clean_ftp_log_period():
|
||||
FTPLog.objects.filter(date_start__lt=expired_day).delete()
|
||||
|
||||
|
||||
@register_as_period_task(interval=3600*24)
|
||||
@shared_task
|
||||
@register_as_period_task(interval=3600 * 24)
|
||||
@shared_task(verbose_name=_('Clean audits log'))
|
||||
def clean_audits_log_period():
|
||||
clean_login_log_period()
|
||||
clean_operation_log_period()
|
||||
|
||||
Reference in New Issue
Block a user