Zulip server and web application. Open-source team chat that helps teams stay productive and focused.
realm_export: Use queue_event_on_commit helper function.
Prakhar Pratyushf0cbce564db7
diff --git a/zerver/views/realm_export.py b/zerver/views/realm_export.pyindex 5374ce73bb6..2b56e552bd5 100644--- a/zerver/views/realm_export.py+++ b/zerver/views/realm_export.py@@ -13,7 +13,7 @@ from zerver.actions.realm_export import do_delete_realm_export, notify_realm_expfrom zerver.decorator import require_realm_adminfrom zerver.lib.exceptions import JsonableErrorfrom zerver.lib.export import get_realm_exports_serialized-from zerver.lib.queue import queue_json_publish+from zerver.lib.queue import queue_event_on_commitfrom zerver.lib.response import json_successfrom zerver.lib.typed_endpoint import typed_endpointfrom zerver.lib.typed_endpoint_validators import check_int_in_validator@@ -100,7 +100,7 @@ def export_realm("user_profile_id": user.id,"realm_export_id": row.id,}- transaction.on_commit(lambda: queue_json_publish("deferred_work", event))+ queue_event_on_commit("deferred_work", event)return json_success(request, data={"id": row.id})