Skip to content

Commit 1c6ebe3

Browse files
committed
Wording
1 parent 9b3c7f9 commit 1c6ebe3

File tree

1 file changed

+13
-9
lines changed

1 file changed

+13
-9
lines changed

docs/userguide/tasks.rst

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1548,15 +1548,19 @@ depending on state from the current transaction*:
15481548
transaction.commit()
15491549
expand_abbreviations.delay(article.pk)
15501550
1551-
Note that Django 1.6 and later enable autocommit mode by default
1552-
(deprecating `commit_on_success` and `commit_manually`), automatically
1553-
wrapping each SQL query in its own transaction, avoiding the race
1554-
condition by default and making it less likely that you'll encounter
1555-
the above problem. However, enabling `ATOMIC_REQUESTS` on the database
1556-
connection will bring back the transaction per request model and the
1557-
race condition along with it. In this case, the simplest solution is
1558-
just to use the `@transaction.non_atomic_requests` to switch it back
1559-
to autocommit for that view.
1551+
.. note::
1552+
Django 1.6 (and later) now enables autocommit mode by default,
1553+
and ``commit_on_success``/``commit_manually`` are depreacated.
1554+
1555+
This means each SQL query is wrapped and executed in individual
1556+
transactions, making it less likely to experience the
1557+
problem described above.
1558+
1559+
However, enabling ``ATOMIC_REQUESTS`` on the database
1560+
connection will bring back the transaction-per-request model and the
1561+
race condition along with it. In this case, the simple solution is
1562+
using the ``@transaction.non_atomic_requests`` decorator to go back
1563+
to autocommit for that view only.
15601564
15611565
.. _task-example:
15621566

0 commit comments

Comments
 (0)