From d6d3d921fab3484b4a103ea6030116e5fd4054ce Mon Sep 17 00:00:00 2001 From: Administrator <admin@example.com> Date: 星期二, 11 七月 2023 10:16:57 +0800 Subject: [PATCH] 华鑫适配 --- trade/current_price_process_manager.py | 10 ++++++++-- 1 files changed, 8 insertions(+), 2 deletions(-) diff --git a/trade/current_price_process_manager.py b/trade/current_price_process_manager.py index 19f99ed..c3d15e3 100644 --- a/trade/current_price_process_manager.py +++ b/trade/current_price_process_manager.py @@ -122,7 +122,13 @@ try: add_code_set = set(add_code_list) global latest_add_codes - if not latest_add_codes or tuple(latest_add_codes) != tuple(add_code_set): + if not latest_add_codes: + latest_add_codes = set() + # 鍒ゆ柇璁剧疆鐨勪唬鐮佹槸鍚︾浉鍚� + dif1 = latest_add_codes - add_code_set + dif2 = add_code_set - latest_add_codes + if dif1 or dif2: + print("璁剧疆L2浠g爜鏁伴噺锛�", len(add_code_set)) latest_add_codes = add_code_set add_datas = [] for d in add_code_list: @@ -130,7 +136,7 @@ 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.push(add_datas) + huaxin_target_codes_manager.push(add_datas) except Exception as e: logging.exception(e) else: -- Gitblit v1.8.0