Commit e057286e authored by ZZH's avatar ZZH

add log 2026-5-22 14:19

parent a6378938
...@@ -381,6 +381,6 @@ async def main(): ...@@ -381,6 +381,6 @@ async def main():
if __name__ == "__main__": if __name__ == "__main__":
logger.info("水务集团采集服务 (基于 httpx) 正在启动...") logger.info("水务集团采集服务 (基于 httpx) 正在启动...")
try: try:
asyncio.run(tools()) asyncio.run(main())
except KeyboardInterrupt: except KeyboardInterrupt:
logger.info("进程被用户手动终止。") logger.info("进程被用户手动终止。")
...@@ -93,11 +93,15 @@ class Meter3rdForward: ...@@ -93,11 +93,15 @@ class Meter3rdForward:
except Exception as e: except Exception as e:
continue continue
cnt = 0
for sid, payload in d_pyds.items(): for sid, payload in d_pyds.items():
logger.info(f"{sid}: {payload}") logger.info(f"{sid}: {payload}")
self.client_pub.publish( self.client_pub.publish(
f"{self.pub_topic_prefix}/load_ele/{sid}", f"{self.pub_topic_prefix}/load_ele/{sid}",
json.dumps(payload), qos=1) json.dumps(payload), qos=1)
cnt += 1
logger.info(f"forward fid:{fid} {cnt} msgs")
except Exception as e: except Exception as e:
logger.error(f"parse_and_forward error: {e}") logger.error(f"parse_and_forward error: {e}")
......
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