Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[KS-347] Start tracking registerTrigger goroutine #13688

Merged
merged 7 commits into from
Jun 27, 2024
12 changes: 10 additions & 2 deletions core/services/workflows/engine.go
Original file line number Diff line number Diff line change
Expand Up @@ -355,9 +355,17 @@ func (e *Engine) registerTrigger(ctx context.Context, t *triggerCapability, trig
}}
}

e.wg.Add(1)
go func() {
for event := range eventsCh {
e.triggerEvents <- event
defer e.wg.Done()

for {
select {
case <-e.stopCh:
return
case event := <-eventsCh:
e.triggerEvents <- event
}
}
}()

Expand Down
Loading