Remove panic recovering (#3162)

This commit is contained in:
qwerty287 2024-01-11 19:37:47 +01:00 committed by GitHub
parent f8fb28e651
commit d0380e31b5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -17,7 +17,6 @@ package queue
import (
"container/list"
"context"
"runtime"
"sync"
"time"
@ -241,17 +240,6 @@ func (q *fifo) process() {
return
}
defer func() {
// the risk of panic is low. This code can probably be removed
// once the code has been used in real world installs without issue.
if err := recover(); err != nil {
const size = 64 << 10
buf := make([]byte, size)
buf = buf[:runtime.Stack(buf, false)]
log.Error().Msgf("queue: unexpected panic: %v\n%s", err, buf)
}
}()
q.resubmitExpiredPipelines()
q.filterWaiting()
for pending, worker := q.assignToWorker(); pending != nil && worker != nil; pending, worker = q.assignToWorker() {