|
|
@@ -97,12 +97,7 @@ class NilmDB(object): |
|
|
|
|
|
|
|
# SQLite database too |
|
|
|
sqlfilename = os.path.join(self.basepath, "data.sql") |
|
|
|
# We use check_same_thread = False, assuming that the rest |
|
|
|
# of the code (e.g. Server) will be smart and not access this |
|
|
|
# database from multiple threads simultaneously. Otherwise |
|
|
|
# false positives will occur when the database is only opened |
|
|
|
# in one thread, and only accessed in another. |
|
|
|
self.con = sqlite3.connect(sqlfilename, check_same_thread = False) |
|
|
|
self.con = sqlite3.connect(sqlfilename, check_same_thread = True) |
|
|
|
self._sql_schema_update() |
|
|
|
|
|
|
|
# See big comment at top about the performance implications of this |
|
|
|