| | |
| | | latest_add_codes = set() |
| | | |
| | | |
| | | def accept_prices(prices): |
| | | def accept_prices(prices, request_id=None): |
| | | # 获取首板代码 |
| | | first_codes = gpcode_manager.FirstGPCodesManager().get_first_gp_codes_cache() |
| | | |
| | |
| | | if True: |
| | | print("设置L2代码数量:", len(add_code_set)) |
| | | global latest_add_codes |
| | | logger_l2_codes_subscript.info(f"预处理新增订阅代码:{add_code_set - latest_add_codes}") |
| | | logger_l2_codes_subscript.info(f"({request_id})预处理新增订阅代码:{add_code_set - latest_add_codes}") |
| | | latest_add_codes = add_code_set |
| | | add_datas = [] |
| | | for d in add_code_list: |
| | |
| | | limit_up_price = round(float(limit_up_price), 2) |
| | | min_volume = int(round(50 * 10000 / limit_up_price)) |
| | | add_datas.append((d, min_volume, limit_up_price)) |
| | | huaxin_target_codes_manager.HuaXinL2SubscriptCodesManager.push(add_datas) |
| | | huaxin_target_codes_manager.HuaXinL2SubscriptCodesManager.push(add_datas, request_id) |
| | | except Exception as e: |
| | | logging.exception(e) |
| | | else: |