statistics
This commit is contained in:
parent
5e76e53885
commit
bc9c3f24ff
6
test.py
6
test.py
|
@ -1,6 +0,0 @@
|
||||||
from datetime import datetime, timedelta
|
|
||||||
|
|
||||||
current_date = datetime.now().date()
|
|
||||||
tomorrow = current_date + timedelta(days=1)
|
|
||||||
past_7_days_date = current_date - timedelta(days=7)
|
|
||||||
print(tomorrow)
|
|
1
xumu.py
1
xumu.py
|
@ -274,6 +274,7 @@ async def message_publish(data):
|
||||||
r = r.json()
|
r = r.json()
|
||||||
res.append(r)
|
res.append(r)
|
||||||
if is_warning(deviceId, v, t):
|
if is_warning(deviceId, v, t):
|
||||||
|
print(deviceId + "报警")
|
||||||
# 如果是报警数据,则发送到报警数据表
|
# 如果是报警数据,则发送到报警数据表
|
||||||
send_json = insert_to_warning_sql(deviceId, v, t)
|
send_json = insert_to_warning_sql(deviceId, v, t)
|
||||||
r = requests.post(baseHost + insertUri, headers=headers, json=send_json)
|
r = requests.post(baseHost + insertUri, headers=headers, json=send_json)
|
||||||
|
|
Loading…
Reference in New Issue