mirror of
https://github.com/jumpserver/jumpserver.git
synced 2025-09-16 07:18:22 +00:00
perf: account task timing not triggered (#9564)
Co-authored-by: feng <1304903146@qq.com>
This commit is contained in:
@@ -3,7 +3,6 @@
|
||||
from celery import shared_task
|
||||
from django.utils.translation import gettext_lazy as _
|
||||
|
||||
from accounts.models import AccountBackupAutomation
|
||||
from common.utils import get_object_or_none, get_logger
|
||||
from orgs.utils import tmp_to_org, tmp_to_root_org
|
||||
|
||||
@@ -12,6 +11,7 @@ logger = get_logger(__file__)
|
||||
|
||||
@shared_task(verbose_name=_('Execute account backup plan'))
|
||||
def execute_account_backup_plan(pid, trigger):
|
||||
from accounts.models import AccountBackupAutomation
|
||||
with tmp_to_root_org():
|
||||
plan = get_object_or_none(AccountBackupAutomation, pk=pid)
|
||||
if not plan:
|
||||
|
Reference in New Issue
Block a user