mirror of
https://github.com/django/django.git
synced 2025-07-05 18:29:11 +00:00
[soc2009/multidb] Made reset_queries reset the queries for all connections
git-svn-id: http://code.djangoproject.com/svn/django/branches/soc2009/multidb@10924 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
parent
91520ec364
commit
8bbd192681
@ -51,7 +51,8 @@ signals.request_finished.connect(close_connection)
|
||||
# Register an event that resets connection.queries
|
||||
# when a Django request is started.
|
||||
def reset_queries(**kwargs):
|
||||
connection.queries = []
|
||||
for connection in connections.all():
|
||||
connection.queries = []
|
||||
signals.request_started.connect(reset_queries)
|
||||
|
||||
# Register an event that rolls back the connections
|
||||
|
Loading…
x
Reference in New Issue
Block a user