From 8c7519b0dc79d32a216765a1b46e736d53e3d786 Mon Sep 17 00:00:00 2001
From: Administrator <admin@example.com>
Date: 星期二, 08 八月 2023 14:17:37 +0800
Subject: [PATCH] Buy1PriceManager单例+缓存改造

---
 code_attribute/first_target_code_data_processor.py |   14 +++++++-------
 1 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/code_attribute/first_target_code_data_processor.py b/code_attribute/first_target_code_data_processor.py
index eec5b75..7dee83b 100644
--- a/code_attribute/first_target_code_data_processor.py
+++ b/code_attribute/first_target_code_data_processor.py
@@ -34,7 +34,7 @@
             codes.append(code)
 
     # ---鏌ヨ鎯充拱鍗曪紝濡傛灉娌℃湁鍦ㄥ垪琛ㄤ腑灏遍渶瑕佸己琛屽姞鍏ュ垪琛�
-    want_codes = gpcode_manager.WantBuyCodesManager.list_code()
+    want_codes = gpcode_manager.WantBuyCodesManager().list_code_cache()
     if want_codes:
         # 娌℃湁鍦ㄧ幇浠烽噰闆嗕腑鐨勬兂涔颁唬鐮�
         diff_codes = set(want_codes) - set(codes)
@@ -105,7 +105,7 @@
         need_get_volumn = False
         if code not in global_util.max60_volumn or global_util.max60_volumn.get(code) is None:
             need_get_volumn = True
-        if not need_get_volumn and code_nature_analyse.CodeNatureRecordManager.get_nature(
+        if not need_get_volumn and code_nature_analyse.CodeNatureRecordManager.get_nature_cache(
                 code) is None:
             need_get_volumn = True
         if need_get_volumn:
@@ -134,7 +134,7 @@
                                                      volumes_data)
             except Exception as e:
                 logger_first_code_record.error(f"{code}:{str(e)}")
-    gpcode_manager.FirstCodeManager.add_record(codes)
+    gpcode_manager.FirstCodeManager().add_record(codes)
     # 鍒濆鍖栨澘鍧椾俊鎭�
     for code in codes:
         block_info.init_code(code)
@@ -190,8 +190,8 @@
             limit_up_time = tool.get_now_time_str()
         if is_limit_up:
             # 鍔犲叆棣栨澘娑ㄥ仠
-            gpcode_manager.FirstCodeManager.add_limited_up_record([code])
-        pricePre = gpcode_manager.get_price_pre(code)
+            gpcode_manager.FirstCodeManager().add_limited_up_record([code])
+        pricePre = gpcode_manager.CodePrePriceManager.get_price_pre_cache(code)
         if pricePre is None:
             inited_data.re_set_price_pres([code])
 
@@ -201,10 +201,10 @@
              "limit_up": is_limit_up})
         if code in new_add_codes:
             if is_limit_up:
-                place_order_count = trade_data_manager.placeordercountmanager.get_place_order_count(
+                place_order_count = trade_data_manager.PlaceOrderCountManager().get_place_order_count(
                     code)
                 if place_order_count == 0:
-                    trade_data_manager.placeordercountmanager.place_order(code)
+                    trade_data_manager.PlaceOrderCountManager().place_order(code)
 
     gpcode_first_screen_manager.process_ticks(prices)
 

--
Gitblit v1.8.0