From 2e79cb888e0acfef3645228ee7c8bd1edd4ba7bb Mon Sep 17 00:00:00 2001
From: Administrator <admin@example.com>
Date: 星期一, 23 九月 2024 13:23:47 +0800
Subject: [PATCH] bug修复

---
 l2/place_order_single_data_manager.py |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/l2/place_order_single_data_manager.py b/l2/place_order_single_data_manager.py
index ab1ffd6..6913075 100644
--- a/l2/place_order_single_data_manager.py
+++ b/l2/place_order_single_data_manager.py
@@ -42,6 +42,7 @@
         if code in cls.__latest_limit_up_sell_list_dict:
             cls.__latest_limit_up_sell_list_dict.pop(code)
         if code in cls.__latest_limit_up_sell_order_no_set_dict:
+            async_log_util.info(logger_debug, f"娓呴櫎琚姩鍗栫浉鍏虫暟鎹細{code}")
             cls.__latest_limit_up_sell_order_no_set_dict.pop(code)
 
     @classmethod
@@ -55,15 +56,16 @@
         if code not in cls.__latest_limit_up_sell_list_dict:
             cls.__latest_limit_up_sell_list_dict[code] = []
         cls.__latest_limit_up_sell_list_dict[code].append(data)
-        async_log_util.info(logger_debug, f"娣诲姞娑ㄥ仠鍗栨暟鎹細{code}-{data}")
+        # async_log_util.info(logger_debug, f"娣诲姞娑ㄥ仠鍗栨暟鎹細{code}-{data}")
         if code not in cls.__latest_limit_up_sell_order_no_set_dict:
             cls.__latest_limit_up_sell_order_no_set_dict[code] = set()
         cls.__latest_limit_up_sell_order_no_set_dict[code].add(data['val']['orderNo'])
         # 鍙繚鐣欏墠20鐨勬暟鎹�
         if len(cls.__latest_limit_up_sell_list_dict[code]) > 20:
+            delete_datas = cls.__latest_limit_up_sell_list_dict[code][:-20]
             cls.__latest_limit_up_sell_list_dict[code] = cls.__latest_limit_up_sell_list_dict[code][-20:]
             # 鍒犻櫎涔嬪墠鐨刴ap
-            for d in cls.__latest_limit_up_sell_list_dict[code][0:-20]:
+            for d in delete_datas:
                 cls.__latest_limit_up_sell_order_no_set_dict[code].discard(d["val"]["orderNo"])
 
     @classmethod

--
Gitblit v1.8.0