From d7f8ba58ada311300f60326beb08a564c28bcffc Mon Sep 17 00:00:00 2001 From: wangruidong <940853815@qq.com> Date: Mon, 26 Feb 2024 13:37:01 +0800 Subject: [PATCH] =?UTF-8?q?perf:=20=E4=BD=9C=E4=B8=9A=E6=97=A5=E5=BF=97?= =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E4=BB=BB=E5=8A=A1=E7=B1=BB=E5=9E=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/audits/serializers.py | 2 +- apps/audits/tasks.py | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/apps/audits/serializers.py b/apps/audits/serializers.py index 78c42fdd0..cda203537 100644 --- a/apps/audits/serializers.py +++ b/apps/audits/serializers.py @@ -23,7 +23,7 @@ class JobLogSerializer(JobExecutionSerializer): class Meta: model = models.JobLog read_only_fields = [ - "id", "material", "time_cost", 'date_start', + "id", "material", 'job_type', "time_cost", 'date_start', 'date_finished', 'date_created', 'is_finished', 'is_success', 'task_id', 'creator_name' diff --git a/apps/audits/tasks.py b/apps/audits/tasks.py index 667fc5c5f..a22eaeb33 100644 --- a/apps/audits/tasks.py +++ b/apps/audits/tasks.py @@ -43,6 +43,7 @@ def clean_password_change_log_period(): days = get_log_keep_day('PASSWORD_CHANGE_LOG_KEEP_DAYS') expired_day = now - datetime.timedelta(days=days) PasswordChangeLog.objects.filter(datetime__lt=expired_day).delete() + logger.info("Clean password change log done") def clean_activity_log_period():