Administrator
4 小时以前 2f2516749615da866e96d8d24e499b7ecbb63a3e
huaxin_client/l1_client.py
@@ -222,7 +222,7 @@
    """
    if fixed_codes is None:
        fixed_codes = set()
    logger_local_huaxin_l1.info("运行l1订阅服务")
    logger_local_huaxin_l1.info(f"运行l1订阅服务,固定代码:{fixed_codes}")
    codes_sh = []
    codes_sz = []
    for i in range(15):
@@ -287,11 +287,10 @@
            list_ = [level1_data_dict[k] for k in level1_data_dict]
            flist = []
            now_time_int = int(tool.get_now_time_str().replace(":", ""))
            threshold_rate = constant.L1_MIN_RATE_PRE if now_time_int < int(
                "094000") else constant.L1_MIN_RATE
            threshold_rate = constant.L1_MIN_RATE
            for d in list_:
                if d[2] >= threshold_rate or d[0] in fixed_codes:
                    # 涨幅小于5%的需要删除
                    # 涨幅小于3%的需要删除
                    flist.append(d)
            flist.sort(key=lambda x: x[2], reverse=True)
            # 将固定代码的排在最前
@@ -310,7 +309,6 @@
            if len(datas) > 0:
                logger_l2_codes_subscript.info("开始#华鑫L1上传代码:数量-{}", len(datas))
                __upload_codes_info(queue_l1_w_strategy_r, datas)
        except Exception as e:
            logging.exception(e)
            logger_debug.exception(e)