|
|
@ -25,10 +25,10 @@ while is_on:
|
|
|
|
# track state
|
|
|
|
# track state
|
|
|
|
file = open("/shared/results.json", "r")
|
|
|
|
file = open("/shared/results.json", "r")
|
|
|
|
oldData = file.read()
|
|
|
|
oldData = file.read()
|
|
|
|
if oldData == json_string:
|
|
|
|
if oldData != json_string:
|
|
|
|
stateChanged = False
|
|
|
|
|
|
|
|
else:
|
|
|
|
|
|
|
|
stateChanged = True
|
|
|
|
stateChanged = True
|
|
|
|
|
|
|
|
else:
|
|
|
|
|
|
|
|
stateChanged = False
|
|
|
|
|
|
|
|
|
|
|
|
# old file removal must happen after state tracking:
|
|
|
|
# old file removal must happen after state tracking:
|
|
|
|
os.remove("/shared/results.json")
|
|
|
|
os.remove("/shared/results.json")
|
|
|
|