mirror of
https://github.com/ansible/awx.git
synced 2026-05-07 17:37:37 -02:30
unify call pattern for get_tasks
This commit is contained in:
committed by
Seth Foster
parent
76d76d13b0
commit
bf89093fac
@@ -275,12 +275,12 @@ class WorkflowManager(TaskBase):
|
|||||||
task.save(update_fields=['status', 'job_explanation', 'timed_out'])
|
task.save(update_fields=['status', 'job_explanation', 'timed_out'])
|
||||||
|
|
||||||
@timeit
|
@timeit
|
||||||
def get_tasks(self):
|
def get_tasks(self, filter_args):
|
||||||
self.all_tasks = [wf for wf in WorkflowJob.objects.filter(status='running')]
|
self.all_tasks = [wf for wf in WorkflowJob.objects.filter(**filter_args)]
|
||||||
|
|
||||||
@timeit
|
@timeit
|
||||||
def _schedule(self):
|
def _schedule(self):
|
||||||
self.get_tasks()
|
self.get_tasks(dict(status__in=["running"], dependencies_processed=True))
|
||||||
if len(self.all_tasks) > 0:
|
if len(self.all_tasks) > 0:
|
||||||
self.spawn_workflow_graph_jobs()
|
self.spawn_workflow_graph_jobs()
|
||||||
self.timeout_approval_node()
|
self.timeout_approval_node()
|
||||||
|
|||||||
Reference in New Issue
Block a user