@ -183,13 +183,13 @@ func handleTask(notification database.VulnerabilityNotification, st *utils.Stopp
for{
// Max attempts exceeded.
ifattempts>=maxAttempts{
log.Infof("giving up on sending notification '%s' to notifier '%s': max attempts exceeded (%d)\n",notification.Name,notifierName,maxAttempts)
log.Infof("giving up on sending notification '%s' via notifier '%s': max attempts exceeded (%d)\n",notification.Name,notifierName,maxAttempts)
returnfalse,false
}
// Backoff.
ifbackOff>0{
log.Infof("waiting %v before retrying to send notification '%s' to notifier '%s' (Attempt %d / %d)\n",backOff,notification.Name,notifierName,attempts+1,maxAttempts)
log.Infof("waiting %v before retrying to send notification '%s' via notifier '%s' (Attempt %d / %d)\n",backOff,notification.Name,notifierName,attempts+1,maxAttempts)
if!st.Sleep(backOff){
returnfalse,true
}
@ -199,9 +199,10 @@ func handleTask(notification database.VulnerabilityNotification, st *utils.Stopp
iferr:=notifier.Send(notification);err!=nil{
// Send failed; increase attempts/backoff and retry.