Skip to content

Commit

Permalink
Closes database connection at every health check
Browse files Browse the repository at this point in the history
  • Loading branch information
courcelm authored and codingjoe committed Feb 7, 2018
1 parent d292ada commit 0d23119
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion health_check/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ def _run(plugin):
return plugin.errors
finally:
from django.db import connection
connection.close_if_unusable_or_obsolete()
connection.close()

with ThreadPoolExecutor(max_workers=len(plugins) or 1) as executor:
for ers in executor.map(_run, plugins):
Expand Down

0 comments on commit 0d23119

Please sign in to comment.