Skip to content

Commit

Permalink
unblock after for loop instead
Browse files Browse the repository at this point in the history
  • Loading branch information
sonroyaalmerol committed Nov 18, 2024
1 parent c177c90 commit 27516d8
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions internal/backend/backup/jobrun.go
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,6 @@ func RunBackup(job *store.Job, storeInstance *store.Store, waitChan chan struct{
go func() {
taskC := <-taskChan
task = &taskC
cancel()
}()

for {
Expand All @@ -153,8 +152,6 @@ func RunBackup(job *store.Job, storeInstance *store.Store, waitChan chan struct{
time.Sleep(time.Millisecond * 100)
}

<-watchCtx.Done()

if task == nil {
return nil, fmt.Errorf("RunBackup: task not found -> %w", err)
}
Expand Down

0 comments on commit 27516d8

Please sign in to comment.