diff --git a/internal/manager/task_generate.go b/internal/manager/task_generate.go index f2aab2b3c..6f8ac8178 100644 --- a/internal/manager/task_generate.go +++ b/internal/manager/task_generate.go @@ -262,7 +262,9 @@ func (j *GenerateJob) Execute(ctx context.Context, progress *job.Progress) error for f := range queue { if job.IsCancelled(ctx) { - break + // keep draining the queue so the producer goroutine can finish + // and release its read transaction, otherwise the DB stays locked + continue } wg.Add()