mirror of
https://github.com/ansible/awx.git
synced 2026-01-22 15:08:03 -03:30
fetch running workflow jobs once per process
This commit is contained in:
parent
da603dd3ad
commit
74ed1c2c40
@ -473,6 +473,7 @@ class TaskManager():
|
||||
logger.debug(six.text_type("Dependent {} couldn't be scheduled on graph, waiting for next cycle").format(task.log_format))
|
||||
|
||||
def process_pending_tasks(self, pending_tasks):
|
||||
running_workflow_templates = set([wf.workflow_job_template_id for wf in self.get_running_workflow_jobs()])
|
||||
for task in pending_tasks:
|
||||
self.process_dependencies(task, self.generate_dependencies(task))
|
||||
if self.is_job_blocked(task):
|
||||
@ -482,9 +483,7 @@ class TaskManager():
|
||||
found_acceptable_queue = False
|
||||
idle_instance_that_fits = None
|
||||
if isinstance(task, WorkflowJob):
|
||||
running_workflow_templates = [wf.workflow_job_template_id for wf in self.get_running_workflow_jobs()]
|
||||
running = task.workflow_job_template_id in running_workflow_templates
|
||||
if running:
|
||||
if task.workflow_job_template_id in running_workflow_templates:
|
||||
if not task.allow_simultaneous:
|
||||
logger.debug(six.text_type("{} is blocked from running, workflow already running").format(task.log_format))
|
||||
continue
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user