mirror of
https://github.com/jumpserver/jumpserver.git
synced 2025-09-05 01:11:57 +00:00
perf: Add task description (#14033)
Co-authored-by: ZhaoJiSen <97007455+ZhaoJiSen@users.noreply.github.com>
This commit is contained in:
@@ -28,8 +28,16 @@ def task_activity_callback(self, pid, trigger, tp, *args, **kwargs):
|
||||
|
||||
|
||||
@shared_task(
|
||||
queue='ansible', verbose_name=_('Account execute automation'),
|
||||
activity_callback=task_activity_callback
|
||||
queue='ansible',
|
||||
verbose_name=_('Account execute automation'),
|
||||
activity_callback=task_activity_callback,
|
||||
description=_(
|
||||
"""
|
||||
Unified execution entry for account automation tasks: when the system performs tasks
|
||||
such as account push, password change, account verification, account collection,
|
||||
and gateway account verification, all tasks are executed through this unified entry
|
||||
"""
|
||||
)
|
||||
)
|
||||
def execute_account_automation_task(pid, trigger, tp):
|
||||
model = AutomationTypes.get_type_model(tp)
|
||||
@@ -54,8 +62,14 @@ def record_task_activity_callback(self, record_ids, *args, **kwargs):
|
||||
|
||||
|
||||
@shared_task(
|
||||
queue='ansible', verbose_name=_('Execute automation record'),
|
||||
activity_callback=record_task_activity_callback
|
||||
queue='ansible',
|
||||
verbose_name=_('Execute automation record'),
|
||||
activity_callback=record_task_activity_callback,
|
||||
description=_(
|
||||
"""
|
||||
When manually executing password change records, this task is used
|
||||
"""
|
||||
)
|
||||
)
|
||||
def execute_automation_record_task(record_ids, tp):
|
||||
from accounts.models import ChangeSecretRecord
|
||||
@@ -84,7 +98,11 @@ def execute_automation_record_task(record_ids, tp):
|
||||
|
||||
@shared_task(
|
||||
verbose_name=_('Clean change secret and push record period'),
|
||||
description=_('Clean change secret and push record period description')
|
||||
description=_(
|
||||
"""
|
||||
Clean change secret and push record period description
|
||||
"""
|
||||
)
|
||||
)
|
||||
@register_as_period_task(crontab=CRONTAB_AT_AM_THREE)
|
||||
def clean_change_secret_and_push_record_period():
|
||||
|
Reference in New Issue
Block a user