update
This commit is contained in:
parent
e0761230f1
commit
f866300b7b
|
@ -26,5 +26,4 @@ try:
|
|||
t2 = LOT_DATA(**data)
|
||||
add(t2)
|
||||
except Exception as e:
|
||||
print(e)
|
||||
pass
|
||||
|
|
|
@ -220,6 +220,6 @@ def test():
|
|||
|
||||
if __name__ == '__main__':
|
||||
# 正式环境
|
||||
# local()
|
||||
local()
|
||||
# 测试环境
|
||||
test()
|
||||
# test()
|
||||
|
|
|
@ -191,7 +191,7 @@ def get_data():
|
|||
client.publish(publish_topic, payload=json.dumps(data, ensure_ascii=False), qos=0)
|
||||
add(t2)
|
||||
except Exception as e:
|
||||
print(e)
|
||||
# print(e)
|
||||
pass
|
||||
|
||||
|
||||
|
@ -220,16 +220,16 @@ def p():
|
|||
client.publish(publish_topic, payload=json.dumps(data, ensure_ascii=False), qos=0)
|
||||
add(t2)
|
||||
except Exception as e:
|
||||
print(e)
|
||||
# print(e)
|
||||
pass
|
||||
|
||||
|
||||
def on_connect(client, userdata, flags, rc):
|
||||
if rc == 0:
|
||||
# 测试
|
||||
threading.Thread(target=p).start()
|
||||
# threading.Thread(target=p).start()
|
||||
# 正式环境
|
||||
# threading.Thread(target=get_data).start()
|
||||
threading.Thread(target=get_data).start()
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
|
|
Loading…
Reference in New Issue