Merge pull request #29 from j00bar/patch-1

Use psycopg2 attr to test connection usability
This commit is contained in:
2018-01-02 10:03:30 -05:00
committed by GitHub
+4
View File
@@ -101,3 +101,7 @@ class DatabaseWrapper(Psycopg2DatabaseWrapper):
else:
pool.dispose()
del db_pool.pools[key]
def is_usable(self):
# https://github.com/kennethreitz/django-postgrespool/issues/24
return not self.connection.closed