summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWayne Witzel III <wayne@riotousliving.com>2018-08-01 21:55:19 +0200
committerWayne Witzel III <wayne@riotousliving.com>2018-08-01 21:55:19 +0200
commitda603dd3ade33cb81949d7b9b0fc4ec7f8bf8a18 (patch)
tree08f0c96a2434dbf50dbef119ad2f4c3de44d2e37
parentunless allow_simultaneous, do not start workflow jobs that are already running (diff)
downloadawx-da603dd3ade33cb81949d7b9b0fc4ec7f8bf8a18.tar.xz
awx-da603dd3ade33cb81949d7b9b0fc4ec7f8bf8a18.zip
use workflow_template_id
-rw-r--r--awx/main/scheduler/task_manager.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/awx/main/scheduler/task_manager.py b/awx/main/scheduler/task_manager.py
index 24ffab5103..748f269dfd 100644
--- a/awx/main/scheduler/task_manager.py
+++ b/awx/main/scheduler/task_manager.py
@@ -482,11 +482,11 @@ class TaskManager():
found_acceptable_queue = False
idle_instance_that_fits = None
if isinstance(task, WorkflowJob):
- running_workflow_templates = [wf.workflow_job_template.pk for wf in self.get_running_workflow_jobs()]
- running = task.workflow_job_template.pk in running_workflow_templates
+ 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 not task.allow_simultaneous:
- logger.debug(six.text_type("{} is blocked from running, workflow already running").format(task.log_format, task.workflow_job_template.pk))
+ logger.debug(six.text_type("{} is blocked from running, workflow already running").format(task.log_format))
continue
self.start_task(task, None, task.get_jobs_fail_chain(), None)
continue