This commit is contained in:
xyj 2023-12-19 10:02:32 +08:00
parent 4cc6d3bb21
commit 7f8e58f80b
1 changed files with 5 additions and 1 deletions

View File

@ -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()