Skip to content

Commit

Permalink
turn off db connection close
Browse files Browse the repository at this point in the history
  • Loading branch information
GabrielBarberini committed Jul 29, 2024
1 parent 406d6e2 commit d74234e
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions lib/repositories/repo.py
Original file line number Diff line number Diff line change
Expand Up @@ -141,9 +141,17 @@ async def _cleanup_instance(self):
self._stop_prospecting()
if not self._get_instance_prospecting():
if self._client:
self._client.close()
logger.info("Connection closed for %s", self.__class__)
self._client = None
pass
#uncomment if you want to close the connection
#self._client.close()
#self._client = None
#logger.info("Connection closed for %s", self.__class__)
else:
logger.info(
"Prospecting instances left for %s: %d",
self.__class__,
self._get_instance_prospecting(),
)

def _get_connection_string(self):
if not getattr(self, '_initialized', False):
Expand Down

0 comments on commit d74234e

Please sign in to comment.