From ff7282ea3ba204502c00504280bfef8f34fa88ab Mon Sep 17 00:00:00 2001 From: Luca Date: Fri, 10 May 2024 18:01:36 +0200 Subject: [PATCH] chore(app): log task errors locally --- shiftregister/app/tasks.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/shiftregister/app/tasks.py b/shiftregister/app/tasks.py index 07143ba..02e93cb 100644 --- a/shiftregister/app/tasks.py +++ b/shiftregister/app/tasks.py @@ -32,6 +32,7 @@ def send_messages(): for msg in send(msg.as_outbound() for msg in msgs if not msg.sent_at): sent_msg_ids.append(msg.key) except Exception as e: + logger.error(e) sentry_sdk.capture_exception(e) Message.objects.select_for_update().filter(id__in=sent_msg_ids).update( @@ -81,4 +82,5 @@ def send_reminders(): try: reg.send_reminder() except Exception as e: + logger.error(e) sentry_sdk.capture_exception(e)