diff --git a/create_db.py b/create_db.py index a7d086e..34a50bd 100755 --- a/create_db.py +++ b/create_db.py @@ -26,5 +26,4 @@ try: t2 = LOT_DATA(**data) add(t2) except Exception as e: - print(e) pass diff --git a/sensor_to_local.py b/sensor_to_local.py index 941602a..2956e68 100755 --- a/sensor_to_local.py +++ b/sensor_to_local.py @@ -220,6 +220,6 @@ def test(): if __name__ == '__main__': # 正式环境 - # local() + local() # 测试环境 - test() + # test() diff --git a/sensor_to_server.py b/sensor_to_server.py index 7da900b..b511b5b 100755 --- a/sensor_to_server.py +++ b/sensor_to_server.py @@ -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__':