mirror of
https://github.com/nikdoof/test-auth.git
synced 2025-12-17 19:59:29 +00:00
Use static dbcusor
This commit is contained in:
@@ -80,7 +80,9 @@ class BaseDBService(BaseService):
|
|||||||
|
|
||||||
@property
|
@property
|
||||||
def _dbcursor(self):
|
def _dbcursor(self):
|
||||||
return self._db.cursor()
|
if not hasattr(self, '__dbcursor'):
|
||||||
|
self.__dbcursor = self._db.cursor()
|
||||||
|
return self.__dbcursor
|
||||||
|
|
||||||
def __del__(self):
|
def __del__(self):
|
||||||
if hasattr(self, '_db'):
|
if hasattr(self, '_db'):
|
||||||
|
|||||||
Reference in New Issue
Block a user