Fix sqlite3 multithreading.
This commit is contained in:
parent
b87ec448d6
commit
c43bf42666
@ -272,7 +272,9 @@ def thermostat_loop():
|
|||||||
global forced_mode
|
global forced_mode
|
||||||
global new_forced_mode
|
global new_forced_mode
|
||||||
global current_time
|
global current_time
|
||||||
global cursor
|
|
||||||
|
dbconn = sqlite3.connect("./instance/thermostat.db")
|
||||||
|
cursor = dbconn.cursor()
|
||||||
|
|
||||||
while True:
|
while True:
|
||||||
# if stop.is_set():
|
# if stop.is_set():
|
||||||
|
Loading…
Reference in New Issue
Block a user