From 1e50f0cc24713bf71ee33dc559bdb99d7c413941 Mon Sep 17 00:00:00 2001 From: Matthew Jones Date: Sun, 6 Apr 2014 02:15:44 -0400 Subject: [PATCH] Don't add other jobs to the dependency task chain such that if we are running a job (as opposed to an inventory update or project update) they may proceed even if the job failed. --- awx/main/management/commands/run_task_system.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/awx/main/management/commands/run_task_system.py b/awx/main/management/commands/run_task_system.py index 6b0cbb6c95..4f4dc6c8fd 100644 --- a/awx/main/management/commands/run_task_system.py +++ b/awx/main/management/commands/run_task_system.py @@ -230,9 +230,13 @@ def process_graph(graph, task_capacity): node_obj = task_node['node_object'] node_args = task_node['metadata'] impact = node_obj.task_impact + node_is_job = graph.get_node_type(node_obj) == 'job' if impact <= remaining_volume or running_impact == 0: + node_dependencies = graph.get_dependents(node_obj) + if graph.get_node_type(node_obj) == 'job': # Allow other tasks to continue if a job fails, even if they are other jobs + node_dependencies = [] dependent_nodes = [{'type': graph.get_node_type(node_obj), 'id': node_obj.id}] + \ - [{'type': graph.get_node_type(n['node_object']), 'id': n['node_object'].id} for n in graph.get_dependents(node_obj)] + [{'type': graph.get_node_type(n['node_object']), 'id': n['node_object'].id} for n in node_dependencies] error_handler = handle_work_error.s(subtasks=dependent_nodes) start_status = node_obj.start(error_callback=error_handler) if not start_status: