mirror of https://github.com/jumpserver/jumpserver
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
14 lines
408 B
14 lines
408 B
2 years ago
|
# -*- coding: utf-8 -*-
|
||
|
#
|
||
|
from assets.tasks.common import generate_data
|
||
|
from common.const.choices import Trigger
|
||
|
|
||
|
|
||
|
def automation_execute_start(task_name, tp, child_snapshot=None):
|
||
|
from accounts.models import AutomationExecution
|
||
|
data = generate_data(task_name, tp, child_snapshot)
|
||
|
execution = AutomationExecution.objects.create(
|
||
|
trigger=Trigger.manual, **data
|
||
|
)
|
||
|
execution.start()
|