From 6ecc9780ef1f583e173ef25b9ff41205dad20ef2 Mon Sep 17 00:00:00 2001 From: GabrielBarberini Date: Thu, 28 Dec 2023 02:25:42 -0300 Subject: [PATCH] fixes repositories connection close timing --- lib/repositories/environment.py | 2 -- lib/repositories/flight.py | 2 -- lib/repositories/motor.py | 2 -- lib/repositories/rocket.py | 2 -- 4 files changed, 8 deletions(-) diff --git a/lib/repositories/environment.py b/lib/repositories/environment.py index 50ddad5..0456026 100644 --- a/lib/repositories/environment.py +++ b/lib/repositories/environment.py @@ -86,8 +86,6 @@ async def get_env(self) -> "Union[Env, None]": return None except Exception as e: raise Exception(f"Error getting environment: {str(e)}") - finally: - self.__del__() async def delete_env(self) -> "DeleteResult": """ diff --git a/lib/repositories/flight.py b/lib/repositories/flight.py index 8ad03f2..b262383 100644 --- a/lib/repositories/flight.py +++ b/lib/repositories/flight.py @@ -90,8 +90,6 @@ async def get_flight(self) -> "Union[Flight, None]": return None except Exception as e: raise Exception(f"Error getting flight: {str(e)}") - finally: - self.__del__() async def delete_flight(self) -> "DeleteResult": """ diff --git a/lib/repositories/motor.py b/lib/repositories/motor.py index 0d438ff..3770f63 100644 --- a/lib/repositories/motor.py +++ b/lib/repositories/motor.py @@ -88,8 +88,6 @@ async def get_motor(self) -> "Union[motor, None]": return None except Exception as e: raise Exception(f"Error getting motor: {str(e)}") - finally: - self.__del__() async def delete_motor(self) -> "DeleteResult": """ diff --git a/lib/repositories/rocket.py b/lib/repositories/rocket.py index 10ccceb..163096a 100644 --- a/lib/repositories/rocket.py +++ b/lib/repositories/rocket.py @@ -88,8 +88,6 @@ async def get_rocket(self) -> "Union[Rocket, None]": return None except Exception as e: raise Exception(f"Error getting rocket: {str(e)}") - finally: - self.__del__() async def delete_rocket(self) -> "DeleteResult": """