This commit is contained in:
xyj 2023-12-05 17:01:46 +08:00
parent 4d8ece6847
commit 42a53c63fa
1 changed files with 2 additions and 2 deletions

View File

@ -16,13 +16,13 @@ def on_connect(client, userdata, flags, rc):
global times
if rc == 0:
print("连接成功,执行数据推送和本地存储")
subprocess.Popen(['/usr/bin/bash start_data_upload'], shell=True)
subprocess.Popen(['/usr/bin/bash start_data_upload.sh'], shell=True)
times = 3
def on_connect_fail(client, userdata):
print("失败,执行本地存储")
subprocess.Popen(['/usr/bin/bash stop_data_upload'], shell=True)
subprocess.Popen(['/usr/bin/bash stop_data_upload.sh'], shell=True)
times = 3