mirror of
https://github.com/jumpserver/jumpserver.git
synced 2025-09-07 02:10:23 +00:00
perf: 优化并发处理
This commit is contained in:
@@ -1,13 +1,13 @@
|
||||
# ~*~ coding: utf-8 ~*~
|
||||
from celery import shared_task
|
||||
from django.utils.translation import gettext_noop
|
||||
from django.utils.translation import gettext_lazy as _
|
||||
from django.utils.translation import gettext_noop
|
||||
|
||||
from accounts.const import AutomationTypes
|
||||
from accounts.tasks.common import automation_execute_start
|
||||
from assets.models import Node
|
||||
from common.utils import get_logger
|
||||
from orgs.utils import org_aware_func
|
||||
from accounts.const import AutomationTypes
|
||||
from accounts.tasks.common import automation_execute_start
|
||||
|
||||
__all__ = ['gather_asset_accounts']
|
||||
logger = get_logger(__name__)
|
||||
@@ -18,11 +18,11 @@ def gather_asset_accounts_util(nodes, task_name):
|
||||
from accounts.models import GatherAccountsAutomation
|
||||
task_name = GatherAccountsAutomation.generate_unique_name(task_name)
|
||||
|
||||
child_snapshot = {
|
||||
task_snapshot = {
|
||||
'nodes': [str(node.id) for node in nodes],
|
||||
}
|
||||
tp = AutomationTypes.verify_account
|
||||
automation_execute_start(task_name, tp, child_snapshot)
|
||||
automation_execute_start(task_name, tp, task_snapshot)
|
||||
|
||||
|
||||
@shared_task(queue="ansible", verbose_name=_('Gather asset accounts'))
|
||||
|
Reference in New Issue
Block a user