This commit is contained in:
xyj 2023-12-11 15:00:51 +08:00
parent d19903e199
commit 7bd8a8bcb6
1 changed files with 1 additions and 3 deletions

View File

@ -24,9 +24,7 @@ class DataUploadClient:
self.client.on_disconnect = self.on_disconnect
def on_connect(self, client, userdata, flags, rc):
global times
times = 6
client.publish('success', payload='连接成功,执行数据推送和本地存储' + str(time.time()), qos=0)
self.client.publish('success', payload='连接成功,执行数据推送和本地存储' + str(time.time()), qos=0)
subprocess.Popen(['/usr/bin/bash /home/pi/lot_manager/bash/start_data_upload.sh'], shell=True)
def on_disconnect(self, client, userdata, rc):