transaction: Add durable=True to outermost transaction.atomic decorator.

This commit adds 'durable=True' to the outermost transactions
of the following functions:
* do_create_multiuse_invite_link
* do_revoke_user_invite
* do_revoke_multi_use_invite
* sync_ldap_user_data
* do_reactivate_remote_server
* do_deactivate_remote_server
* bulk_handle_digest_email
* handle_customer_migration_from_server_to_realm
* add_reaction
* remove_reaction
* deactivate_user_group

It helps to avoid creating unintended savepoints in the future.

This is as a part of our plan to explicitly mark all the
transaction.atomic decorators with either 'savepoint=False' or
'durable=True' as required.

* 'savepoint=True' is used in special cases.
This commit is contained in:
Prakhar Pratyush
2024-11-01 16:42:53 +05:30
committed by Tim Abbott
parent 9371bdb81d
commit 0fb5657131
7 changed files with 11 additions and 11 deletions

View File

@@ -1035,7 +1035,7 @@ def get_human_user_realm_uuids(
return billable_realm_uuids
@transaction.atomic
@transaction.atomic(durable=True)
def handle_customer_migration_from_server_to_realm(
server: RemoteZulipServer,
) -> None: