Skip to content

Commit cce9230

Browse files
authored
Merge pull request #1088 from readthedocs/davidfischer/enable-atomic-requests
Enable atomic requests
2 parents e87f8c8 + 4c41ca3 commit cce9230

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

config/settings/production.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,9 @@
4545
USE_DB_POOLING = env.bool("USE_DB_POOLING", default=False)
4646
for db in ("default", "replica"):
4747
if db in DATABASES:
48+
# https://docs.djangoproject.com/en/dev/topics/db/transactions/#tying-transactions-to-http-requests
49+
DATABASES[db]["ATOMIC_REQUESTS"] = True
50+
4851
if "OPTIONS" not in DATABASES[db]:
4952
DATABASES[db]["OPTIONS"] = {}
5053

0 commit comments

Comments
 (0)