Administrator
2023-09-25 d4645c925024fbcf8947b0435d4b4754829e3a9e
成交数据上传优化
2个文件已修改
21 ■■■■■ 已修改文件
l2/l2_data_manager_new.py 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
trade/huaxin/huaxin_trade_server.py 19 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
l2/l2_data_manager_new.py
@@ -10,7 +10,6 @@
from l2.huaxin import l2_huaxin_util, huaxin_delegate_postion_manager
from log_module import async_log_util
from third_data import kpl_data_manager, block_info
from trade.deal_big_money_manager import DealComputeProgressManager
from utils import global_util, ths_industry_util, tool
import l2_data_util
from db import redis_manager_delegate as redis_manager
@@ -232,7 +231,6 @@
    __WhiteListCodeManager = l2_trade_util.WhiteListCodeManager()
    __WantBuyCodesManager = gpcode_manager.WantBuyCodesManager()
    __TradeTargetCodeModeManager = TradeTargetCodeModeManager()
    __DealComputeProgressManager = DealComputeProgressManager()
    __TradeOrderIdManager = trade_huaxin.TradeOrderIdManager()
    # 获取代码评分
trade/huaxin/huaxin_trade_server.py
@@ -323,7 +323,6 @@
                        buy_progress_index = buyno_map[buy_no]["index"]
                        break
                if buy_progress_index is not None:
                    # 获取执行位时间
                    buy_single_index, buy_exec_index, compute_index, num, count, max_num_set, volume_rate = l2_data_manager.TradePointManager().get_buy_compute_start_data_cache(
@@ -334,7 +333,7 @@
                    async_log_util.info(logger_l2_trade_buy_queue, "获取成交位置成功: code-{} index-{}", code,
                                        buy_progress_index)
                    limit_up_price = gpcode_manager.get_limit_up_price(code)
                    if buy_exec_index:
                    if buy_exec_index and buy_exec_index > -1:
                        m_base_val = L2PlaceOrderParamsManager.get_base_m_val(code)
                        need_cancel, msg = DCancelBigNumComputer().set_trade_progress(code,
                                                                                      buy_progress_index,
@@ -349,25 +348,25 @@
                    f2 = dask.delayed(LCancelBigNumComputer().set_trade_progress)(code,
                                                                                  buy_progress_index,
                                                                                  total_datas)
                    f3 = dask.delayed(
                        deal_big_money_manager.DealComputeProgressManager().set_trade_progress)(
                        code,
                        buy_progress_index,
                        total_datas,
                        num_operate_map)
                    # f3 = dask.delayed(
                    #     deal_big_money_manager.DealComputeProgressManager().set_trade_progress)(
                    #     code,
                    #     buy_progress_index,
                    #     total_datas,
                    #     num_operate_map)
                    f4 = dask.delayed(
                        SecondCancelBigNumComputer().set_transaction_index)(
                        code,
                        buy_progress_index)
                    dask.compute(f2, f3, f4)
                    dask.compute(f2, f4)
                else:
                    pass
            except Exception as e:
                hx_logger_l2_transaction.exception(e)
            finally:
                async_log_util.info(hx_logger_l2_transaction, f"处理用时:{int((time.time() - __start_time) * 1000)}")
                async_log_util.info(hx_logger_l2_transaction, f"{code}处理用时:{int((time.time() - __start_time) * 1000)}")
    @classmethod
    def l2_market_data(cls, code, data):