Skip to content

Commit

Permalink
fix suspend cancelation
Browse files Browse the repository at this point in the history
  • Loading branch information
raphaelvigee committed Apr 16, 2024
1 parent 3ec18ac commit fdb20bb
Showing 1 changed file with 2 additions and 10 deletions.
12 changes: 2 additions & 10 deletions worker2/worker.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,16 +44,8 @@ func (w *Worker) Run() {
w.exec.eventsCh <- EventSuspended{Execution: w.exec}

go func() {
select {
case <-ctx.Done():
w.exec.eventsCh <- EventCompleted{
Execution: w.exec,
Output: w.exec.outStore.Get(),
Error: ctx.Err(),
}
case <-w.exec.resumeCh:
w.queue()
}
<-w.exec.resumeCh
w.queue()
}()
} else {
w.exec.eventsCh <- EventCompleted{
Expand Down

0 comments on commit fdb20bb

Please sign in to comment.