Commit cad0ad0
authored
set_roll_back should only rollback initialized connections
The exception handler call "connections.all()". This creates a database connection to all defined databases.
As a small optimization you can use "connections.all(initialized_only=True)" to rollback only the database to which the current thread has open connections.
(My application can have many databases defined, and this loop is identified as a source of many idle database connections)1 parent dbac145 commit cad0ad0
1 file changed
+1
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
64 | 64 | | |
65 | 65 | | |
66 | 66 | | |
67 | | - | |
| 67 | + | |
68 | 68 | | |
69 | 69 | | |
70 | 70 | | |
| |||
0 commit comments