update
This commit is contained in:
parent
4d8ece6847
commit
42a53c63fa
4
ceshi.py
4
ceshi.py
|
@ -16,13 +16,13 @@ def on_connect(client, userdata, flags, rc):
|
||||||
global times
|
global times
|
||||||
if rc == 0:
|
if rc == 0:
|
||||||
print("连接成功,执行数据推送和本地存储")
|
print("连接成功,执行数据推送和本地存储")
|
||||||
subprocess.Popen(['/usr/bin/bash start_data_upload'], shell=True)
|
subprocess.Popen(['/usr/bin/bash start_data_upload.sh'], shell=True)
|
||||||
times = 3
|
times = 3
|
||||||
|
|
||||||
|
|
||||||
def on_connect_fail(client, userdata):
|
def on_connect_fail(client, userdata):
|
||||||
print("失败,执行本地存储")
|
print("失败,执行本地存储")
|
||||||
subprocess.Popen(['/usr/bin/bash stop_data_upload'], shell=True)
|
subprocess.Popen(['/usr/bin/bash stop_data_upload.sh'], shell=True)
|
||||||
|
|
||||||
|
|
||||||
times = 3
|
times = 3
|
||||||
|
|
Loading…
Reference in New Issue