bugfix: fix a bug when use loop (#2852)

Signed-off-by: xuesongzuo@yunify.com <xuesongzuo@yunify.com>
This commit is contained in:
zuoxuesong-worker 2025-11-12 17:49:30 +08:00 committed by GitHub
parent 423d9f1b33
commit dcce8df095
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -178,6 +178,9 @@ func (e *taskExecutor) execTaskHost(i int, h string) func(ctx context.Context) {
// if loop is empty. execute once, and the item is null
for _, item := range e.dealLoop(had) {
resErr = e.executeModule(ctx, e.task, item, h, &stdout, &stderr)
if resErr != nil {
break
}
}
}
}