| | |
| | | |
| | | 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 |
| | | |
| | |
| | | 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_)) |
| | | |
| | |
| | | # 删除买撤点数据 |
| | | def delete_buy_cancel_point(self, code): |
| | | tool.CodeDataCacheUtil.clear_cache(self.__buy_cancel_single_pos_cache, code) |
| | | # TODO 测试 |
| | | # RedisUtils.delete_async(self.__db, "buy_cancel_single_pos-{}".format(code)) |
| | | RedisUtils.delete_async(self.__db, "buy_cancel_single_pos-{}".format(code)) |
| | | |
| | | |
| | | # 清除l2数据 |