From 297f6d85430ded65ac9c7fd123293dcfd1e932a4 Mon Sep 17 00:00:00 2001 From: GabrielBarberini Date: Sun, 5 May 2024 20:00:29 -0300 Subject: [PATCH] removes connection closing mechanism --- lib/repositories/environment.py | 4 ---- lib/repositories/repo.py | 3 --- 2 files changed, 7 deletions(-) diff --git a/lib/repositories/environment.py b/lib/repositories/environment.py index e0d56bf..1301498 100644 --- a/lib/repositories/environment.py +++ b/lib/repositories/environment.py @@ -62,7 +62,6 @@ async def create_env(self): logger.info( f"Call to repositories.environment.create_env completed; states: EnvID {self.env_id}" ) - await self.close_connection() async def update_env(self): """ @@ -88,7 +87,6 @@ async def update_env(self): logger.info( f"Call to repositories.environment.update_env completed; states: Env {hash(self.env)}, EnvID {self.env_id}" ) - await self.close_connection() async def get_env(self) -> "Union[Env, None]": """ @@ -108,7 +106,6 @@ async def get_env(self) -> "Union[Env, None]": logger.info( f"Call to repositories.environment.get_env completed; states: Env {hash(self.env)}, EnvID {self.env_id}" ) - await self.close_connection() async def delete_env(self): """ @@ -126,4 +123,3 @@ async def delete_env(self): logger.info( f"Call to repositories.environment.delete_env completed; states: Env {hash(self.env)}, EnvID {self.env_id}" ) - await self.close_connection() diff --git a/lib/repositories/repo.py b/lib/repositories/repo.py index 1c3028d..cfebf67 100644 --- a/lib/repositories/repo.py +++ b/lib/repositories/repo.py @@ -24,6 +24,3 @@ def __init__(self, collection: str): ) self.db = self.client.rocketpy self.collection = self.db[collection] - - async def close_connection(self) -> None: - self.client.close()