Administrator
2023-09-18 33b3466031a725b52d4c9ee682c079d6509e07bc
third_data/data_server.py
@@ -25,6 +25,7 @@
from trade import bidding_money_manager, trade_manager, l2_trade_util
from trade.l2_trade_util import BlackListCodeManager
import concurrent.futures
class DataServer(BaseHTTPRequestHandler):
@@ -42,6 +43,7 @@
    __jingxuan_cache_dict = {}
    __industry_cache_dict = {}
    __latest_limit_up_codes_set = set()
    __data_process_thread_pool = concurrent.futures.ThreadPoolExecutor(max_workers=10)
    def __get_limit_up_list(self):
        # 统计目前为止的代码涨停数量(分涨停原因)
@@ -539,7 +541,7 @@
                self.__kplDataManager.save_data(type_, result_list)
        elif type_ == KPLDataType.LIMIT_UP.value:
            result_list = kpl_util.parseDaBanData(data["data"], kpl_util.DABAN_TYPE_LIMIT_UP)
            threading.Thread(target=lambda: do_limit_up(result_list), daemon=True).start()
            self.__data_process_thread_pool.submit(lambda: do_limit_up(result_list))
        elif type_ == KPLDataType.OPEN_LIMIT_UP.value:
            result_list = kpl_util.parseDaBanData(data["data"], kpl_util.DABAN_TYPE_OPEN_LIMIT_UP)
            if result_list: