Browse Source

perf: 作业日志添加任务类型

pull/12693/head
wangruidong 9 months ago committed by w940853815
parent
commit
d7f8ba58ad
  1. 2
      apps/audits/serializers.py
  2. 1
      apps/audits/tasks.py

2
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'

1
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():

Loading…
Cancel
Save