From 39e23db5237da4317ff4a2023817b6608869a88c Mon Sep 17 00:00:00 2001 From: Alan Rominger Date: Mon, 12 Jul 2021 15:32:17 -0400 Subject: [PATCH] Make minor changes to add needed imports --- awx/main/models/ha.py | 1 + awx/main/tasks.py | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/awx/main/models/ha.py b/awx/main/models/ha.py index edfa1a0dca..17116c5c3c 100644 --- a/awx/main/models/ha.py +++ b/awx/main/models/ha.py @@ -2,6 +2,7 @@ # All Rights Reserved. from decimal import Decimal +import random from django.core.validators import MinValueValidator from django.db import models, connection diff --git a/awx/main/tasks.py b/awx/main/tasks.py index 5435c3fad3..e5a8d4a6c6 100644 --- a/awx/main/tasks.py +++ b/awx/main/tasks.py @@ -106,7 +106,7 @@ from awx.main.utils.common import ( get_cpu_capacity, get_system_task_capacity, ) -from awx.main.utils.execution_environments import get_default_pod_spec, CONTAINER_ROOT, to_container_path +from awx.main.utils.execution_environments import get_default_execution_environment, get_default_pod_spec, CONTAINER_ROOT, to_container_path from awx.main.utils.ansible import read_ansible_config from awx.main.utils.external_logging import reconfigure_rsyslog from awx.main.utils.safe_yaml import safe_dump, sanitize_jinja @@ -408,6 +408,7 @@ def cleanup_execution_environment_images(): if process.returncode != 0: logger.debug(f"Failed to delete image {image_name}") + @task(queue=get_local_queuename) def check_heartbeat(node): AWXReceptorJob.check_heartbeat(node) @@ -2835,6 +2836,7 @@ class RunAdHocCommand(BaseTask): params['process_isolation'] = False if MODE == 'development' else True return params + @task(queue=get_local_queuename) class RunSystemJob(BaseTask):