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