Split TaskManager into

- DependencyManager spawns dependencies if necessary
- WorkflowManager processes running workflows to see if a new job is
  ready to spawn
- TaskManager starts tasks if unblocked and has execution capacity
This commit is contained in:
Seth Foster
2022-06-27 17:35:46 -04:00
parent 19c24cba10
commit 431b9370df
7 changed files with 295 additions and 249 deletions

View File

@@ -2,7 +2,7 @@
import logging
# AWX
from awx.main.scheduler import TaskManager
from awx.main.scheduler import TaskManager, DependencyManager, WorkflowManager
from awx.main.dispatch.publish import task
from awx.main.dispatch import get_local_queuename
@@ -10,6 +10,21 @@ logger = logging.getLogger('awx.main.scheduler')
@task(queue=get_local_queuename)
def run_task_manager():
logger.debug("Running task manager.")
def task_manager():
TaskManager().schedule()
@task(queue=get_local_queuename)
def dependency_manager():
DependencyManager().schedule()
@task(queue=get_local_queuename)
def workflow_manager():
WorkflowManager().schedule()
def run_task_manager():
task_manager()
dependency_manager()
workflow_manager()