From 6bbfbbb16d792f7737ec86cabdba5c0e98dcf4b4 Mon Sep 17 00:00:00 2001
From: Administrator <admin@example.com>
Date: 星期五, 29 八月 2025 17:41:29 +0800
Subject: [PATCH] 有涨停买撤单要触发撤单计算

---
 huaxin_client/l2_data_manager_v2.py |   16 +++++++++-------
 1 files changed, 9 insertions(+), 7 deletions(-)

diff --git a/huaxin_client/l2_data_manager_v2.py b/huaxin_client/l2_data_manager_v2.py
index 8076fd6..cee1108 100644
--- a/huaxin_client/l2_data_manager_v2.py
+++ b/huaxin_client/l2_data_manager_v2.py
@@ -19,7 +19,7 @@
 from log_module import async_log_util
 from log_module.async_log_util import huaxin_l2_log
 from log_module.log import logger_local_huaxin_l2_error, logger_system, logger_local_huaxin_l2_subscript, \
-    logger_local_huaxin_l2_special_volume, logger_debug
+    logger_local_huaxin_l2_special_volume, logger_debug, logger_local_huaxin_l2_orderdetail
 from utils import tool, shared_memery_util
 import collections
 import zmq
@@ -70,8 +70,7 @@
             # (鏈�灏忕殑閲�, 娑ㄥ仠浠锋牸, 褰卞瓙鍗曚环鏍�, 涔扮殑閲�, 搴熷純浣跨敤, 鐗规畩鐨勯噺闆嗗悎)
             self.filter_order_condition_dict[code] = [(min_volume, limit_up_price, shadow_price, buy_volume,
                                                        int(min_volume) // 50, set(special_volumes))]
-            huaxin_l2_log.info(logger_local_huaxin_l2_subscript,
-                               f"({code})甯歌杩囨护鏉′欢璁剧疆锛歿self.filter_order_condition_dict[code]}")
+            # logger_local_huaxin_l2_subscript.info(f"({code})甯歌杩囨护鏉′欢璁剧疆锛歿self.filter_order_condition_dict[code]}")
         except Exception as e:
             logger_debug.error(f"{str(e)} - min_volume-{min_volume}")
 
@@ -230,7 +229,8 @@
                     use_time = time.time() - __start_time
                     if use_time > 0.01:
                         # 璁板綍10ms浠ヤ笂鐨勬暟鎹�
-                        huaxin_l2_log.info(logger_local_huaxin_l2_error, f"鑰楁椂:{use_time}s  缁撴潫鏁版嵁锛歿last_data}")
+                        huaxin_l2_log.info(logger_local_huaxin_l2_error,
+                                           f"鑰楁椂:{use_time}s  缁撴潫鏁版嵁锛歿last_data} 鏁版嵁鏁伴噺锛歿len(temp_list)}")
                     temp_list = []
                 else:
                     if code not in self.temp_order_queue_dict:
@@ -241,6 +241,7 @@
 
             except Exception as e:
                 logging.exception(e)
+                logger_local_huaxin_l2_error.exception(e)
             finally:
                 temp_list.clear()
 
@@ -276,8 +277,8 @@
                         break
                     self.l2_transaction_codes.add(code)
                     time.sleep(0.001)
-            except:
-                pass
+            except Exception as e:
+                logger_local_huaxin_l2_error.exception(e)
             finally:
                 temp_list.clear()
 
@@ -368,7 +369,8 @@
 def add_subscript_codes(codes):
     # print("add_subscript_codes", codes)
     # 鍔犲叆涓婁紶闃熷垪
-    common_queue.put(('', "l2_subscript_codes", list(codes)))
+    pid = multiprocessing.current_process().pid
+    common_queue.put(('', "l2_subscript_codes_v2", (pid, list(codes))))
 
 
 def __send_response(sk, msg):

--
Gitblit v1.8.0