Skip to content

Commit f170eeb

Browse files
authored
examples: use event.IsRunnerCompletion to prevent hang (#704)
1 parent b2a6637 commit f170eeb

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

examples/graph/fanout/main.go

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -524,12 +524,10 @@ func (w *fanoutWorkflow) processStreamingResponse(eventChan <-chan *event.Event)
524524
if w.handleErrorEvent(event) {
525525
continue
526526
}
527-
if event.Author == graph.AuthorGraphNode {
528-
w.handleGraphNodeEvent(event, maxPreviewLen)
529-
}
527+
w.handleGraphNodeEvent(event, maxPreviewLen)
530528
w.handleStreamingChoices(event, &workflowStarted)
531529
w.trackStageProgress(event, &stageCount)
532-
if event.Done {
530+
if event.IsRunnerCompletion() {
533531
completionEvent = event
534532
break
535533
}

0 commit comments

Comments
 (0)