This commit is contained in:
xyj 2023-12-09 16:06:45 +08:00
parent b177247f61
commit 3107d92359
2 changed files with 2 additions and 4 deletions

View File

@ -195,6 +195,7 @@ def local():
def test(): def test():
while True: while True:
time.sleep(10)
try: try:
data = {'ambient_temperature': 1, data = {'ambient_temperature': 1,
'ambient_humidity': 1, 'ambient_humidity': 1,
@ -218,8 +219,6 @@ def test():
add(t2) add(t2)
except: except:
pass pass
finally:
time.sleep(10)
if __name__ == '__main__': if __name__ == '__main__':

View File

@ -198,6 +198,7 @@ def t():
def test(): def test():
while True: while True:
time.sleep(10)
try: try:
data = {'ambient_temperature': 1, data = {'ambient_temperature': 1,
'ambient_humidity': 1, 'ambient_humidity': 1,
@ -223,8 +224,6 @@ def test():
except Exception as e: except Exception as e:
print(e) print(e)
pass pass
finally:
time.sleep(10)
def on_connect(client, userdata, flags, rc): def on_connect(client, userdata, flags, rc):