mirror of
https://github.com/jumpserver/jumpserver.git
synced 2025-09-17 07:49:01 +00:00
pref: 修改 activity log (#9571)
* pref: 修改 activity log * perf: 优化 acitivity * pref: 修改 activity * fix: 修复一些运行问题 * fix: app.py 中添加 tasks import * fix: 添加 activity_callback * fix: 添加 execute_account_backup_plan activity_callback * fix: 添加 activity_callback -> gather_asset_accounts * fix: 对 celery 任务添加 activity_callback 回调 * fix: 修改翻译 --------- Co-authored-by: ibuler <ibuler@qq.com> Co-authored-by: jiangweidong <weidong.jiang@fit2cloud.com> Co-authored-by: Bai <baijiangjie@gmail.com>
This commit is contained in:
@@ -9,5 +9,7 @@ class AuthenticationConfig(AppConfig):
|
||||
def ready(self):
|
||||
from . import signal_handlers
|
||||
from . import notifications
|
||||
from . import tasks
|
||||
|
||||
super().ready()
|
||||
|
||||
|
@@ -8,7 +8,7 @@ from django.utils import timezone
|
||||
from django.utils.translation import gettext_lazy as _
|
||||
|
||||
|
||||
@register_as_period_task(interval=3600 * 24)
|
||||
@shared_task(verbose_name=_('Clean expired session'))
|
||||
@register_as_period_task(interval=3600 * 24)
|
||||
def clean_django_sessions():
|
||||
Session.objects.filter(expire_date__lt=timezone.now()).delete()
|
||||
|
Reference in New Issue
Block a user