Administrator
2023-08-17 b4480ad745510c8e81c88c20fb67cb65eef79cc5
l2/l2_data_manager.py
@@ -5,6 +5,7 @@
from db import redis_manager_delegate as redis_manager
from db.redis_manager_delegate import RedisUtils
from log_module.log import logger_debug
from utils import tool
from utils.tool import CodeDataCacheUtil
@@ -103,12 +104,12 @@
        if buy_single_index is not None:
            data_ = (buy_single_index, buy_exec_index, compute_index, nums, count, list(max_num_sets),
                     volume_rate)
        else:
            _buy_single_index, _buy_exec_index, _compute_index, _nums, _count, _max_num_index, _volume_rate = self.get_buy_compute_start_data_cache(
                code)
            data_ = (_buy_single_index, buy_exec_index, compute_index, nums, count, list(max_num_sets),
                     volume_rate)
        logger_debug.info(f"保存买入执行位置信息{code}:{data_}")
        CodeDataCacheUtil.set_cache(self.__buy_compute_index_info_cache, code, data_)
        RedisUtils.setex_async(self.__db, _key, expire, json.dumps(data_))