summaryrefslogtreecommitdiff
path: root/addons/test_mail/tests/test_performance.py
diff options
context:
space:
mode:
authorXavierDo <xdo@odoo.com>2018-10-12 11:57:27 +0200
committerXavierDo <35262360+Xavier-Do@users.noreply.github.com>2018-10-18 15:49:28 +0200
commit8f9a767bbea7c25fc5a5eb75b088f7fe8aa756a4 (patch)
tree7dc0466cf109a0d1efdde4cc887e15d212a6ceb0 /addons/test_mail/tests/test_performance.py
parent43856ee6b61859623a209d10a0c2a711105910f2 (diff)
[FIX] mail: avoid concurrent update of notifications
When sending notifications by batch one notification email can be send up to 50 people. For one mail_mail entry to handle 50 emails can be sent as those are sent independently for each recipient. In some cases a bounce may occur while the whole batch of recipients is not completely mailed. In that case the mailgateway will update the notification status to bounced. When the cron finishes to send the whole batch of emails it tries to update the notifications of all recipients. However as a notification has already been updated due to the bounce we face a concurrent update, meaning the transaction is rollbacked. Emails have been sent but notifications are not considered as sent as they have not been updated accordingly. Next time the cron runs it will send the same batch again, with probably the same bounce and rollback. We could therefore face an email loop. This commit add test for this use case. This commit is linked to task ID 1893054.
Diffstat (limited to 'addons/test_mail/tests/test_performance.py')
0 files changed, 0 insertions, 0 deletions