message_send: Don't create savepoint in do_send_messages.

In general, we never want to use savepoints.

This prep commit adds savepoint=False in do_send_messages
as we don't want to just rollback to this savepoint and
proceed if we encounter any error while sending zulip updates
via cron.
This commit is contained in:
Prakhar Pratyush 2024-02-29 09:15:31 +05:30 committed by Tim Abbott
parent 6484532830
commit 23fc04577b
1 changed files with 1 additions and 1 deletions

View File

@ -865,7 +865,7 @@ def do_send_messages(
# Save the message receipts in the database
user_message_flags: Dict[int, Dict[int, List[str]]] = defaultdict(dict)
with transaction.atomic():
with transaction.atomic(savepoint=False):
Message.objects.bulk_create(send_request.message for send_request in send_message_requests)
# Claim attachments in message