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 and sarabala1979 committed Apr 17, 2022
1 parent ed6907f commit 7d00fa9
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 7d00fa9

Please sign in to comment.