Skip to content

Commit

Permalink
Add missing trigger for failed-to-start nodes (#13802)
Browse files Browse the repository at this point in the history
  • Loading branch information
AlanCoding authored Jul 24, 2023
1 parent 53a7b78 commit 98bfe3f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions awx/main/scheduler/task_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,6 @@ def spawn_workflow_graph_jobs(self):
logger.warning("Workflow manager has reached time out while processing running workflows, exiting loop early")
ScheduleWorkflowManager().schedule()
# Do not process any more workflow jobs. Stop here.
# Maybe we should schedule another WorkflowManager run
break
dag = WorkflowDAG(workflow_job)
status_changed = False
Expand All @@ -180,8 +179,8 @@ def spawn_workflow_graph_jobs(self):
workflow_job.save(update_fields=['status', 'start_args'])
status_changed = True
else:
workflow_nodes = dag.mark_dnr_nodes()
WorkflowJobNode.objects.bulk_update(workflow_nodes, ['do_not_run'])
dnr_nodes = dag.mark_dnr_nodes()
WorkflowJobNode.objects.bulk_update(dnr_nodes, ['do_not_run'])
# If workflow is now done, we do special things to mark it as done.
is_done = dag.is_workflow_done()
if is_done:
Expand Down Expand Up @@ -261,6 +260,7 @@ def spawn_workflow_graph_jobs(self):
job.status = 'failed'
job.save(update_fields=['status', 'job_explanation'])
job.websocket_emit_status('failed')
ScheduleWorkflowManager().schedule()

# TODO: should we emit a status on the socket here similar to tasks.py awx_periodic_scheduler() ?
# emit_websocket_notification('/socket.io/jobs', '', dict(id=))
Expand Down

0 comments on commit 98bfe3f

Please sign in to comment.