| | |
| | | import os |
| | | |
| | | import constant |
| | | import tool |
| | | from utils import tool |
| | | |
| | | # 开盘啦历史涨停数据管理 |
| | | from db import mysql_data, redis_manager |
| | | from log import logger_kpl_limit_up_reason_change |
| | | from logs.log import logger_kpl_limit_up_reason_change |
| | | from third_data import kpl_util, kpl_api |
| | | from third_data.code_plate_key_manager import LimitUpCodesPlateKeyManager, CodesHisReasonAndBlocksManager |
| | | |
| | |
| | | |
| | | |
| | | def load_history_limit_up(): |
| | | for file_name in os.listdir("D:/kpl/his"): |
| | | for file_name in os.listdir(f"{constant.get_path_prefix()}/kpl/his"): |
| | | if file_name.find("HisDaBanList_1.log") < 0: |
| | | continue |
| | | day = file_name[:10] |
| | | with open(f"D:/kpl/his/{file_name}", 'r', encoding="utf-16") as f: |
| | | with open(f"{constant.get_path_prefix()}/kpl/his/{file_name}", 'r', encoding="utf-16") as f: |
| | | lines = f.readlines() |
| | | line = lines[0] |
| | | result = json.loads(line) |