diff options
author | Dan McGee <dan@archlinux.org> | 2013-01-16 03:49:56 +0100 |
---|---|---|
committer | Dan McGee <dan@archlinux.org> | 2013-01-16 03:49:56 +0100 |
commit | af32c23768c7537f19e0613525579208b4f44eb4 (patch) | |
tree | b4738329c119e8e9987d8f12b4b4043a653417fb /retro/models.py | |
parent | 0f6a0a1cd0011c8ad137a4b27d0b39a7e1129fb7 (diff) | |
download | archweb-af32c23768c7537f19e0613525579208b4f44eb4.tar.gz archweb-af32c23768c7537f19e0613525579208b4f44eb4.tar.xz |
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 'retro/models.py')
0 files changed, 0 insertions, 0 deletions