diff options
author | Dan McGee <dan@archlinux.org> | 2013-01-15 20:49:56 -0600 |
---|---|---|
committer | Dan McGee <dan@archlinux.org> | 2013-01-15 20:49:56 -0600 |
commit | af32c23768c7537f19e0613525579208b4f44eb4 (patch) | |
tree | b4738329c119e8e9987d8f12b4b4043a653417fb /devel/utils.py | |
parent | 0f6a0a1cd0011c8ad137a4b27d0b39a7e1129fb7 (diff) |
Handle connection and transaction more properly in reporead
A few minor things are fixed here. One is PostgreSQL, and more
specifically pgbouncer, don't like it when the connection is closed
after psycopg2 has started an implicit transaction even for read-only
queries. Ensure we call commit as our last database action in all cases.
The other is related- Django in management commands doesn't ever call
close on any database connection you may have been using, so PostgreSQL
gets mad about this fact and logs a message saying such. Close the
connection explicitly when we are done with it to play nice.
Signed-off-by: Dan McGee <dan@archlinux.org>
Diffstat (limited to 'devel/utils.py')
0 files changed, 0 insertions, 0 deletions