From fdb20bbfebb54083acf69b85c5de8ac9dd0380ca Mon Sep 17 00:00:00 2001 From: Raphael Vigee Date: Tue, 16 Apr 2024 23:36:08 +0100 Subject: [PATCH] fix suspend cancelation --- worker2/worker.go | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/worker2/worker.go b/worker2/worker.go index e3206de9..41000908 100644 --- a/worker2/worker.go +++ b/worker2/worker.go @@ -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{