Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions cms/djangoapps/contentstore/views/block.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@

from django.contrib.auth.decorators import login_required
from django.core.exceptions import PermissionDenied
from django.db import transaction
from django.http import Http404, HttpResponse
from django.utils.translation import gettext as _
from django.views.decorators.http import require_http_methods
Expand Down Expand Up @@ -74,6 +75,12 @@
ALWAYS = lambda x: True


# Disable atomic requests so transactions made during the request commit immediately instead of waiting for the end of
# the request transaction. This is necessary so the async tasks launched by the current process can see the changes made
# during the request. One example is the async tasks launched when courses are published before the request
# ends, which end up reading from an outdated state of the database. For more information see the discussion in the
# following PR: https://github.com/openedx/edx-platform/pull/34020
@transaction.non_atomic_requests
Comment thread
mariajgrimaldi marked this conversation as resolved.
Outdated
@require_http_methods(("DELETE", "GET", "PUT", "POST", "PATCH"))
@login_required
@expect_json
Expand Down