summaryrefslogtreecommitdiffstats
path: root/devel/management/commands
diff options
context:
space:
mode:
authorDan McGee <dan@archlinux.org>2012-09-20 16:32:42 +0200
committerDan McGee <dan@archlinux.org>2012-09-20 16:32:42 +0200
commit7d5cfe45d52c4dbd2f431f0edcafc9936b740ab2 (patch)
tree0fa167575cb490d0327cb914218cd16751ed74d2 /devel/management/commands
parent33bfba71042a55ff57115e833aabfed9852e80f4 (diff)
downloadarchweb-7d5cfe45d52c4dbd2f431f0edcafc9936b740ab2.tar.gz
archweb-7d5cfe45d52c4dbd2f431f0edcafc9936b740ab2.tar.xz
Explicitly close the database connection in reporead
This is the cause of these warnings showing up in the PostgreSQL log: LOG: unexpected EOF on client connection with an open transaction All management commands are guilty of this as they do not clean up and close the connection when they exit, unlike the standard web request cycle. Other commands should probably be updated as well, but for now, this is the biggest culprit. Signed-off-by: Dan McGee <dan@archlinux.org>
Diffstat (limited to 'devel/management/commands')
-rw-r--r--devel/management/commands/reporead.py1
1 files changed, 1 insertions, 0 deletions
diff --git a/devel/management/commands/reporead.py b/devel/management/commands/reporead.py
index ac74509..ce5c8cb 100644
--- a/devel/management/commands/reporead.py
+++ b/devel/management/commands/reporead.py
@@ -584,6 +584,7 @@ def read_repo(primary_arch, repo_file, options):
else:
db_update(arch, repo, packages_arches[arch], force)
logger.info('Finished database updates for %s.', repo_file)
+ connection.close()
return 0
# vim: set ts=4 sw=4 et: