mirror of
https://github.com/moparisthebest/SickRage
synced 2025-01-07 11:58:01 -05:00
Memory cleanup in sql db routines for mass actions.
This commit is contained in:
parent
5e507b3849
commit
b19aafb807
@ -143,7 +143,9 @@ class DBConnection(object):
|
|||||||
sqlResult.append(self.execute(qu[0], qu[1]))
|
sqlResult.append(self.execute(qu[0], qu[1]))
|
||||||
|
|
||||||
logger.log(u"Transaction with " + str(len(querylist)) + u" queries executed", logger.DEBUG)
|
logger.log(u"Transaction with " + str(len(querylist)) + u" queries executed", logger.DEBUG)
|
||||||
return sqlResult
|
|
||||||
|
# finished
|
||||||
|
break
|
||||||
except sqlite3.OperationalError, e:
|
except sqlite3.OperationalError, e:
|
||||||
sqlResult = []
|
sqlResult = []
|
||||||
if self.connection:
|
if self.connection:
|
||||||
@ -162,6 +164,9 @@ class DBConnection(object):
|
|||||||
logger.log(u"Fatal error executing query: " + ex(e), logger.ERROR)
|
logger.log(u"Fatal error executing query: " + ex(e), logger.ERROR)
|
||||||
raise
|
raise
|
||||||
|
|
||||||
|
# cleanup
|
||||||
|
del querylist
|
||||||
|
|
||||||
return sqlResult
|
return sqlResult
|
||||||
|
|
||||||
def action(self, query, args=None, fetchall=False, fetchone=False):
|
def action(self, query, args=None, fetchall=False, fetchone=False):
|
||||||
|
Loading…
Reference in New Issue
Block a user