Fix: WithLogger doesn't work when cause consume error
Some checks failed
Go / build (push) Has been cancelled

This commit is contained in:
Shigure42
2025-03-06 10:12:19 +08:00
committed by finley
parent 7816eb01de
commit 2bb986cab4

View File

@@ -764,7 +764,7 @@ func (q *DelayQueue) StartConsume() (done <-chan struct{}) {
case <-q.ticker.C:
ids, err := q.beforeConsume()
if err != nil {
log.Printf("consume error: %v", err)
q.logger.Printf("consume error: %v", err)
}
q.goWithRecover(func() {
for _, id := range ids {