Commit 8cd74ae9 authored by ZZH's avatar ZZH

home page lst alarm add log 2024-02-2

parent acb114b7
......@@ -156,7 +156,9 @@ async def post_home_page_lst_alarm(req, body: HomeLstAlarmReq) -> \
start, end, importance, point_ids,
product)
msg = f"time:{start}-{end}, {rlt.total}, {rlt.rows}\n"
event_ts = [(r.date_time, r.name, r.type) for r in rlt.rows]
msg = f"{pendulum.now().format('YYYY-MM-DD HH:mm:ss')} REQ:{start}~{end}," \
f" total:{rlt.total}, event_ts:{event_ts}\n"
log.info(f"home_page_lst_alarm {msg}")
try:
with open("/home/ubuntu/data/code/log/open_data.txt", "a+") as file:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment