mirror of
https://github.com/django/django.git
synced 2025-10-29 08:36:09 +00:00
Added some assertions to enforce the atomicity of atomic.
This commit is contained in:
@@ -70,6 +70,7 @@ signals.request_started.connect(reset_queries)
|
||||
# their lifetime. NB: abort() doesn't do anything outside of a transaction.
|
||||
def close_old_connections(**kwargs):
|
||||
for conn in connections.all():
|
||||
# Remove this when the legacy transaction management goes away.
|
||||
try:
|
||||
conn.abort()
|
||||
except DatabaseError:
|
||||
|
||||
Reference in New Issue
Block a user