This commit is contained in:
xyj 2024-01-05 17:11:31 +08:00
parent 5fdc38d53f
commit ae6a600ca7
1 changed files with 6 additions and 4 deletions

View File

@ -239,10 +239,12 @@ def p():
def on_connect(client, userdata, flags, rc): def on_connect(client, userdata, flags, rc):
if rc == 0: if rc == 0:
# 测试 if subscribe_topic == zhanguan_device_name:
threading.Thread(target=p).start() # 测试
# 正式环境 threading.Thread(target=p).start()
# threading.Thread(target=get_data).start() else:
# 正式环境
threading.Thread(target=get_data).start()
if __name__ == '__main__': if __name__ == '__main__':