From 77945b5d2a3e8e366ca767bef9b9bce137ffee47 Mon Sep 17 00:00:00 2001 From: Rafi Zadanly Date: Wed, 29 Nov 2023 11:19:34 +0700 Subject: Update retry send mail limit to 250 each run --- indoteknik_custom/models/mail_mail.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/indoteknik_custom/models/mail_mail.py b/indoteknik_custom/models/mail_mail.py index 26f8bf5c..82b1fcca 100644 --- a/indoteknik_custom/models/mail_mail.py +++ b/indoteknik_custom/models/mail_mail.py @@ -7,6 +7,6 @@ class MailMail(models.Model): def retry_send_mail(self): mails = self.env['mail.mail'].search([ ('state', 'in', ['exception', 'cancel']), - ]) + ], limit=250) for mail in mails: mail.state = 'outgoing' -- cgit v1.2.3