From 5211eccb5b165225bd9d05d55669983cc8f7f7e3 Mon Sep 17 00:00:00 2001 From: DanielPerkins7 Date: Tue, 1 Aug 2023 14:12:22 +0000 Subject: [PATCH] procedure repeated issue 64 resolve #64. i was unsure which part needed to be repeated so i just repeated the whole function until the message can be saved into the queue, im not sure if this is right though. --- ssm/ssm2.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/ssm/ssm2.py b/ssm/ssm2.py index 72099ad8..694cabba 100644 --- a/ssm/ssm2.py +++ b/ssm/ssm2.py @@ -343,7 +343,11 @@ def _save_msg_to_queue(self, body, empaid): name = self._inq.add({'body': extracted_msg, 'signer': signer, 'empaid': empaid}) - log.info("Message saved to incoming queue as %s", name) + try: + log.info("Message saved to incoming queue as %s", name) + except: + _save_msg_to_queue(self, body, empaid) + except (IOError, OSError) as error: log.error('Failed to read or write file: %s', error)