statistics

This commit is contained in:
xyj 2024-02-20 15:04:51 +08:00
parent 9621df8711
commit c0dd49875d
1 changed files with 0 additions and 2 deletions

View File

@ -274,13 +274,11 @@ async def message_publish(data):
r = r.json()
res.append(r)
if is_warning(deviceId, v, t):
print(deviceId + "报警")
# 如果是报警数据,则发送到报警数据表
send_json = insert_to_warning_sql(deviceId, v, t)
r = requests.post(baseHost + insertUri, headers=headers, json=send_json)
r = r.json()
res.append(r)
print(res)
return BaseResponse(data=res)
except Exception as e:
return BaseResponse(code=500, msg=str(e))