From 324a5e115559d5432f04146b4e788d5bcb2237e0 Mon Sep 17 00:00:00 2001
From: Administrator <admin@example.com>
Date: 星期一, 11 九月 2023 11:30:32 +0800
Subject: [PATCH] 数据编号重复处理

---
 log_module/log_export.py |    9 +++++----
 1 files changed, 5 insertions(+), 4 deletions(-)

diff --git a/log_module/log_export.py b/log_module/log_export.py
index c66565e..f387fc1 100644
--- a/log_module/log_export.py
+++ b/log_module/log_export.py
@@ -82,8 +82,9 @@
                 data = f.readline()
                 if not data:
                     break
-                index = data.find('save_l2_data:')
-                index = data.find('-', index)
+                index = data.find(' - ') + 2
+                if data.find('async_log_util') > 0:
+                    index = data.find(']', index) + 1
                 data = data[index + 1:].strip()
                 code = data[0:6]
                 data = data[7:]
@@ -93,8 +94,8 @@
                 else:
                     today_data[code].extend(dict_)
         for key in today_data:
-            news = sorted(today_data[key], key=lambda x: x["index"])
-            today_data[key] = news
+            # news = sorted(today_data[key], key=lambda x: x["index"])
+            # today_data[key] = news
             print(key, len(today_data[key]) - 1, today_data[key][-1]["index"])
     except:
         pass

--
Gitblit v1.8.0