Skip to content

Commit

Permalink
fix: task worker requeue wrong task. Fixes #8139 (#8186)
Browse files Browse the repository at this point in the history
Signed-off-by: wujayway <wujayway@gmail.com>
  • Loading branch information
wujayway authored Mar 18, 2022
1 parent 3ef403b commit 6d6d23d
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion workflow/executor/agent.go
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,11 @@ func (ae *AgentExecutor) Agent(ctx context.Context) error {
}

func (ae *AgentExecutor) taskWorker(ctx context.Context, taskQueue chan task, responseQueue chan response) {
for task := range taskQueue {
for {
task, ok := <-taskQueue
if !ok {
break
}
nodeID, tmpl := task.NodeId, task.Template
log := log.WithField("nodeID", nodeID)

Expand Down

0 comments on commit 6d6d23d

Please sign in to comment.