From d74234e00176089815d8fedfac28397d1ba2b294 Mon Sep 17 00:00:00 2001 From: GabrielBarberini Date: Sun, 28 Jul 2024 23:16:54 -0300 Subject: [PATCH] turn off db connection close --- lib/repositories/repo.py | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/lib/repositories/repo.py b/lib/repositories/repo.py index e7a6d64..cf47ce6 100644 --- a/lib/repositories/repo.py +++ b/lib/repositories/repo.py @@ -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):