corretti bug sull'invio email
CI / scan_ruby (push) Failing after 12m46s
CI / scan_js (push) Successful in 12m35s
CI / lint (push) Failing after 12m46s

This commit is contained in:
2026-09-10 17:08:50 +02:00
parent 36b3ffe507
commit 3f7794959e
8 changed files with 59 additions and 6 deletions
+6 -1
View File
@@ -115,7 +115,12 @@ class MailingRecipient < ApplicationRecord
end
MAX_SMTP_DEFERS = 8
DEFER_PATTERN = /tentativo (\d+)\//
# Deve combaciare col testo generato sotto ("Da ritentare (N/8): ..."),
# altrimenti smtp_defer_count legge sempre 0 e il retry diventa infinito
# (bug osservato in produzione: un destinatario con SMTP EOF permanente
# veniva ritentato ogni 30s all'infinito, bloccando gli altri destinatari
# in errore della stessa mailing).
DEFER_PATTERN = /Da ritentare \((\d+)\//
def defer_or_fail!(error)
attempt = smtp_defer_count + 1