Skip to content

Commit a58e531

Browse files
authored
hotfix: queue manager handle runningPipeline correctly when reload into queue (erda-project#410)
1 parent 3d3e4ee commit a58e531

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

modules/pipeline/pipengine/reconciler/queuemanage/queue/add_pipeline.go

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,10 +53,14 @@ func (q *defaultQueue) AddPipelineIntoQueue(p *spec.Pipeline, doneCh chan struct
5353
// else add to pending queue.
5454
if p.Status.AfterPipelineQueue() {
5555
q.eq.ProcessingQueue().Add(priorityqueue.NewItem(itemKey, priority, *createdTime))
56+
go func() {
57+
doneCh <- struct{}{}
58+
close(doneCh)
59+
}()
5660
} else {
5761
q.eq.Add(itemKey, priority, *createdTime)
62+
q.doneChanByPipelineID[p.ID] = doneCh
5863
}
59-
q.doneChanByPipelineID[p.ID] = doneCh
6064

6165
go func() {
6266
q.rangeAtOnceCh <- true

0 commit comments

Comments
 (0)