From 516072fd99bb2104482cbef3372013b4e2ada4aa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adri=C3=A0=20Casaj=C3=BAs?= Date: Tue, 11 Jul 2023 10:59:24 +0200 Subject: [PATCH] Fix: save retries to disk (#1799) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Adrià Casajús --- app/mail_sender.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/mail_sender.py b/app/mail_sender.py index 7aba3707..12b60ee9 100644 --- a/app/mail_sender.py +++ b/app/mail_sender.py @@ -46,6 +46,7 @@ class SendRequest: "mail_options": self.mail_options, "rcpt_options": self.rcpt_options, "is_forward": self.is_forward, + "retries": self.retries, } return json.dumps(data).encode("utf-8") @@ -66,6 +67,7 @@ class SendRequest: mail_options=decoded_data["mail_options"], rcpt_options=decoded_data["rcpt_options"], is_forward=decoded_data["is_forward"], + retries=decoded_data.get("retries", 1), ) def save_request_to_unsent_dir(self, prefix: str = "DeliveryFail"):