dbjobqueue: Backoff after listener error
The connection can be briefly interrupted for short periods of time, which is fine. To avoid spamming the logs with error messages, backoff for half a second.
This commit is contained in:
parent
f25dca793d
commit
8fcbeaadb3
1 changed files with 2 additions and 0 deletions
|
|
@ -226,6 +226,8 @@ func (q *DBJobQueue) listen(ctx context.Context, ready chan<- struct{}) {
|
|||
// otherwise, just log the error and continue, there might just
|
||||
// be a temporary networking issue
|
||||
q.logger.Error(err, "Error waiting for notification on jobs channel")
|
||||
// backoff to avoid log spam
|
||||
time.Sleep(time.Millisecond * 500)
|
||||
continue
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue