Skip to content

Commit

Permalink
Merge branch 'develop' into SHIP-1754-Consolidate-all-FinalityDepth-s…
Browse files Browse the repository at this point in the history
…ettings
  • Loading branch information
adityavadhavkar1215 authored Jun 27, 2024
2 parents dc4fb58 + 7a3ba8e commit 7ff582c
Showing 1 changed file with 18 additions and 2 deletions.
20 changes: 18 additions & 2 deletions core/services/workflows/engine.go
Original file line number Diff line number Diff line change
Expand Up @@ -355,9 +355,25 @@ 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, isOpen := <-eventsCh:
if !isOpen {
return
}

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

Expand Down

0 comments on commit 7ff582c

Please sign in to comment.