mirror of
https://github.com/kennethreitz/django-postgrespool.git
synced 2026-06-05 06:46:18 +00:00
Merge pull request #29 from j00bar/patch-1
Use psycopg2 attr to test connection usability
This commit is contained in:
@@ -101,3 +101,7 @@ class DatabaseWrapper(Psycopg2DatabaseWrapper):
|
|||||||
else:
|
else:
|
||||||
pool.dispose()
|
pool.dispose()
|
||||||
del db_pool.pools[key]
|
del db_pool.pools[key]
|
||||||
|
|
||||||
|
def is_usable(self):
|
||||||
|
# https://github.com/kennethreitz/django-postgrespool/issues/24
|
||||||
|
return not self.connection.closed
|
||||||
|
|||||||
Reference in New Issue
Block a user