| | |
| | | local_latest_datas[code] = datas |
| | | set_l2_data_latest_count(code, len(datas)) |
| | | try: |
| | | async_log_util.info(log.logger_l2_data, "{}-{}", code, add_datas) |
| | | async_log_util.info(log.logger_l2_data, f"{code}-{add_datas}") |
| | | except Exception as e: |
| | | logging.exception(e) |
| | | # 暂时不将数据保存到redis |
| | |
| | | before_blocks_dict): |
| | | # 加载涨停代码的目标板块 |
| | | def load_code_block(): |
| | | if limit_up_record_datas: |
| | | for d in limit_up_record_datas: |
| | | if d[2] in constant.KPL_INVALID_BLOCKS and d[3] in before_blocks_dict: |
| | | code_limit_up_reason_dict[d[3]] = list(before_blocks_dict.get(d[3]))[0] |
| | |
| | | |
| | | if current_limit_up_datas is None: |
| | | current_limit_up_datas = [] |
| | | if limit_up_record_datas is None: |
| | | limit_up_record_datas = [] |
| | | code_limit_up_reason_dict = {} |
| | | load_code_block() |
| | | can_buy, msg = cls.__is_block_can_buy(code, block, current_limit_up_datas, code_limit_up_reason_dict, |
| | |
| | | current_limit_up_datas = [] |
| | | if not limit_up_record_datas: |
| | | limit_up_record_datas=[] |
| | | |
| | | |
| | | if CodePlateKeyBuyManager.is_need_cancel(code, limit_up_reasons.get(code), |
| | | current_limit_up_datas, |
| | | limit_up_record_datas, |