mirror of
https://github.com/jumpserver/jumpserver.git
synced 2025-07-06 11:36:32 +00:00
fix: 定时清理任务不生效问题
This commit is contained in:
parent
81027cd561
commit
04e102cb87
@ -16,6 +16,7 @@ from common.storage.ftp_file import FTPFileStorageHandler
|
|||||||
from common.utils import get_log_keep_day, get_logger
|
from common.utils import get_log_keep_day, get_logger
|
||||||
from ops.celery.decorator import register_as_period_task
|
from ops.celery.decorator import register_as_period_task
|
||||||
from ops.models import CeleryTaskExecution
|
from ops.models import CeleryTaskExecution
|
||||||
|
from orgs.utils import tmp_to_root_org
|
||||||
from terminal.backends import server_replay_storage
|
from terminal.backends import server_replay_storage
|
||||||
from terminal.models import Session, Command
|
from terminal.models import Session, Command
|
||||||
from .models import UserLoginLog, OperateLog, FTPLog, ActivityLog, PasswordChangeLog
|
from .models import UserLoginLog, OperateLog, FTPLog, ActivityLog, PasswordChangeLog
|
||||||
@ -119,6 +120,7 @@ def clean_expired_session_period():
|
|||||||
@register_as_period_task(crontab=CRONTAB_AT_AM_TWO)
|
@register_as_period_task(crontab=CRONTAB_AT_AM_TWO)
|
||||||
def clean_audits_log_period():
|
def clean_audits_log_period():
|
||||||
print("Start clean audit session task log")
|
print("Start clean audit session task log")
|
||||||
|
with tmp_to_root_org():
|
||||||
clean_login_log_period()
|
clean_login_log_period()
|
||||||
clean_operation_log_period()
|
clean_operation_log_period()
|
||||||
clean_ftp_log_period()
|
clean_ftp_log_period()
|
||||||
|
Loading…
Reference in New Issue
Block a user