Skip to content

Commit 6531084

Browse files
authored
Merge pull request #11550 from cslzchen/hotfix/fail-to-render-as-fake-sent
[ENG-10041] Mark notifications that failed to render as fake sent
2 parents 0867265 + 99a3815 commit 6531084

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

notifications/tasks.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,11 @@ def safe_render_notification(notifications, email_task):
3333
email_task.error_message = f'Error rendering notification {notification.id}: {str(e)} \n'
3434
email_task.save()
3535
failed_notifications.append(notification.id)
36+
# Mark notifications that failed to render as fake sent
37+
# Use 1000/12/31 to distinguish itself from another type of fake sent 1000/1/1
38+
log_message(f'Error rendering notification, mark as fake sent: [notification_id={notification.id}]')
39+
notification.sent = datetime(1000, 12, 31)
40+
notification.save()
3641
continue
3742

3843
rendered_notifications.append(rendered)

0 commit comments

Comments
 (0)