BEGIN / END no longer necessary as there is no autocommit in new db module

This commit is contained in:
shortcutme 2019-03-16 02:18:53 +01:00
parent a46d8fe7f3
commit 4fe4d0a7e7
No known key found for this signature in database
GPG key ID: 5B63BAE6CB9613AE
6 changed files with 0 additions and 37 deletions

View file

@ -144,9 +144,7 @@ class ChartCollector(object):
s = time.time()
cur = self.db.getCursor()
cur.execute("BEGIN")
cur.cursor.executemany("INSERT INTO data (type_id, value, date_added) VALUES (?, ?, ?)", values)
cur.execute("END")
cur.close()
self.log.debug("Global collectors inserted in %.3fs" % (time.time() - s))
@ -163,9 +161,7 @@ class ChartCollector(object):
s = time.time()
cur = self.db.getCursor()
cur.execute("BEGIN")
cur.cursor.executemany("INSERT INTO data (type_id, site_id, value, date_added) VALUES (?, ?, ?, ?)", values)
cur.execute("END")
cur.close()
self.log.debug("Site collectors inserted in %.3fs" % (time.time() - s))