From 7bd8a8bcb607a77744fc8dfc7066ee071f880673 Mon Sep 17 00:00:00 2001 From: xyj <10908227994@qq.com> Date: Mon, 11 Dec 2023 15:00:51 +0800 Subject: [PATCH] update --- data_upload.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/data_upload.py b/data_upload.py index 19f7c52..4e73b63 100644 --- a/data_upload.py +++ b/data_upload.py @@ -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):