chore(app): log task errors locally
This commit is contained in:
parent
ccf9728200
commit
ff7282ea3b
|
@ -32,6 +32,7 @@ def send_messages():
|
||||||
for msg in send(msg.as_outbound() for msg in msgs if not msg.sent_at):
|
for msg in send(msg.as_outbound() for msg in msgs if not msg.sent_at):
|
||||||
sent_msg_ids.append(msg.key)
|
sent_msg_ids.append(msg.key)
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
|
logger.error(e)
|
||||||
sentry_sdk.capture_exception(e)
|
sentry_sdk.capture_exception(e)
|
||||||
|
|
||||||
Message.objects.select_for_update().filter(id__in=sent_msg_ids).update(
|
Message.objects.select_for_update().filter(id__in=sent_msg_ids).update(
|
||||||
|
@ -81,4 +82,5 @@ def send_reminders():
|
||||||
try:
|
try:
|
||||||
reg.send_reminder()
|
reg.send_reminder()
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
|
logger.error(e)
|
||||||
sentry_sdk.capture_exception(e)
|
sentry_sdk.capture_exception(e)
|
||||||
|
|
Loading…
Reference in New Issue