From c683e33c11e5426f4c7055fc49732b28e4a14e1b Mon Sep 17 00:00:00 2001
From: Administrator <admin@example.com>
Date: 星期四, 01 二月 2024 10:19:19 +0800
Subject: [PATCH] bug修复

---
 l2/l2_data_manager_new.py |    9 ++-------
 1 files changed, 2 insertions(+), 7 deletions(-)

diff --git a/l2/l2_data_manager_new.py b/l2/l2_data_manager_new.py
index ea01054..464e043 100644
--- a/l2/l2_data_manager_new.py
+++ b/l2/l2_data_manager_new.py
@@ -403,7 +403,7 @@
                                                                                                       'val']['time'])
             cls.volume_rate_info[code] = (volume_rate, volume_rate_index)
 
-            latest_time = add_datas[len(add_datas) - 1]["val"]["time"]
+            latest_time = add_datas[-1]["val"]["time"]
 
             # __start_time = l2_data_log.l2_time(code, round(t.time() * 1000) - __start_time,
             #                                    "l2鏁版嵁鍑嗗鏃堕棿")
@@ -436,7 +436,7 @@
                     cls.__process_order(code, start_index, end_index, capture_timestamp, is_first_code)
                 else:
                     # 鏈寕鍗�,鏃堕棿鐩稿樊涓嶅ぇ鎵嶈兘鎸傚崟
-                    if l2.l2_data_util.L2DataUtil.is_same_time(now_time_str, latest_time) or int(now_time_str.replace(":","")) < int("093200"):
+                    if tool.trade_time_sub(latest_time, "09:32:00") < 0 or l2.l2_data_util.L2DataUtil.is_same_time(now_time_str, latest_time):
                         cls.__process_not_order(code, start_index, end_index, capture_timestamp, is_first_code)
 
             async_log_util.info(logger_l2_process, "code:{} 澶勭悊鏁版嵁鑼冨洿: {}-{} 澶勭悊鏃堕棿:{} 鎴浘鏃堕棿鎴筹細{}", code,
@@ -1508,13 +1508,8 @@
     # 蹇�熶拱鍏ユ硶鐨勪俊鍙蜂綅缃煡鎵�
     @classmethod
     def __compute_fast_order_begin_pos(cls, code, start_index, end_index):
-        limit_up_price = gpcode_manager.get_limit_up_price(code)
-        # if float(limit_up_price) < 3:
-        #     return False, -1, "鑲′环灏忎簬3鍧�"
         total_datas = local_today_datas[code]
         start_time_str = total_datas[start_index]["val"]["time"]
-        # if tool.trade_time_sub(start_time_str, "13:00:00") > 0:
-        #     return False, -1, "瓒呰繃瑙勫畾鏃堕棿"
         refer_sell_data = cls.__L2MarketSellManager.get_refer_sell_data(code, start_time_str)
         if refer_sell_data is None:
             return False, -1, "鎬诲崠涓虹┖"

--
Gitblit v1.8.0