mirror of
https://github.com/ansible/awx.git
synced 2026-02-24 06:26:00 -03:30
move node copy into create_unified_job, copy nodes on schedule
This commit is contained in:
@@ -2969,7 +2969,7 @@ class WorkflowJobTemplateLaunch(WorkflowsEnforcementMixin, RetrieveAPIView):
|
|||||||
|
|
||||||
prompted_fields, ignored_fields = obj._accept_or_ignore_job_kwargs(**request.data)
|
prompted_fields, ignored_fields = obj._accept_or_ignore_job_kwargs(**request.data)
|
||||||
|
|
||||||
new_job = obj.create_workflow_job(**prompted_fields)
|
new_job = obj.create_unified_job(**prompted_fields)
|
||||||
new_job.signal_start(**prompted_fields)
|
new_job.signal_start(**prompted_fields)
|
||||||
|
|
||||||
data = OrderedDict()
|
data = OrderedDict()
|
||||||
|
|||||||
@@ -392,8 +392,8 @@ class WorkflowJobTemplate(UnifiedJobTemplate, WorkflowJobOptions, SurveyJobTempl
|
|||||||
success=list(success_notification_templates),
|
success=list(success_notification_templates),
|
||||||
any=list(any_notification_templates))
|
any=list(any_notification_templates))
|
||||||
|
|
||||||
def create_workflow_job(self, **kwargs):
|
def create_unified_job(self, **kwargs):
|
||||||
workflow_job = self.create_unified_job(**kwargs)
|
workflow_job = super(WorkflowJobTemplate, self).create_unified_job(**kwargs)
|
||||||
workflow_job.copy_nodes_from_original(original=self)
|
workflow_job.copy_nodes_from_original(original=self)
|
||||||
return workflow_job
|
return workflow_job
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user