From ab3748ee1bdc3ed85fc721dbfb73cf82bdccdda9 Mon Sep 17 00:00:00 2001 From: "Chris St. Pierre" Date: Fri, 28 Feb 2014 11:25:40 -0500 Subject: Reporting: properly close db connection Close the db connection at the end of each DjangoORM import, not when the reporting collector shuts down. The collector may not have even opened a connection, in the case of a storage backend other than DjangoORM. --- src/lib/Bcfg2/Reporting/Collector.py | 3 --- 1 file changed, 3 deletions(-) (limited to 'src/lib/Bcfg2/Reporting/Collector.py') diff --git a/src/lib/Bcfg2/Reporting/Collector.py b/src/lib/Bcfg2/Reporting/Collector.py index 0493c907b..2859eca28 100644 --- a/src/lib/Bcfg2/Reporting/Collector.py +++ b/src/lib/Bcfg2/Reporting/Collector.py @@ -162,9 +162,6 @@ class ReportingCollector(object): pass if self.storage: self.storage.shutdown() - from django import db - self.logger.info("%s: Closing database connection" % self.name) - db.close_connection() def reap_children(self): """Join any non-live threads""" -- cgit v1.2.3-1-g7c22