update
This commit is contained in:
parent
4cc6d3bb21
commit
7f8e58f80b
6
tool.py
6
tool.py
|
@ -1,6 +1,7 @@
|
|||
import json
|
||||
import os
|
||||
import subprocess
|
||||
import threading
|
||||
|
||||
import requests
|
||||
|
||||
|
@ -102,7 +103,7 @@ def get_list_record(client):
|
|||
pass
|
||||
|
||||
|
||||
def get_record(msg, client):
|
||||
def up(msg, client):
|
||||
try:
|
||||
filename = json.loads(msg.payload.decode('utf-8'))["data"]
|
||||
if filename is None or filename == '':
|
||||
|
@ -114,3 +115,6 @@ def get_record(msg, client):
|
|||
client.publish(info_topic, payload=publish_payload(code=200, msg=str(r)), qos=0)
|
||||
except:
|
||||
pass
|
||||
|
||||
def get_record(msg, client):
|
||||
threading.Thread(target=up, args=(msg, client)).start()
|
||||
|
|
Loading…
Reference in New Issue