From 4f16bf0f1686e2a15fcbc43e17c727c81550609f Mon Sep 17 00:00:00 2001 From: Administrator <admin@example.com> Date: 星期四, 17 七月 2025 14:19:18 +0800 Subject: [PATCH] 人为设置的累计大单的策略修改 --- api/outside_api_command_callback.py | 23 ++++++++++++++--------- 1 files changed, 14 insertions(+), 9 deletions(-) diff --git a/api/outside_api_command_callback.py b/api/outside_api_command_callback.py index 458ba06..fdb57b8 100644 --- a/api/outside_api_command_callback.py +++ b/api/outside_api_command_callback.py @@ -1165,13 +1165,16 @@ except: pass # L鍚庡泭鎷揩鐓� - current_info = LCancelBigNumComputer().statistic_l_down_watch_indexes_info(code) - last_info = LDownCancelWatchIndexStatisticManager().get_statistic_info(code) - fdata['l_down_watch_indexes_info'] = {} - if current_info: - fdata['l_down_watch_indexes_info']['current'] = current_info - if last_info: - fdata['l_down_watch_indexes_info']['last'] = last_info + try: + current_info = LCancelBigNumComputer().statistic_l_down_watch_indexes_info(code) + last_info = LDownCancelWatchIndexStatisticManager().get_statistic_info(code) + fdata['l_down_watch_indexes_info'] = {} + if current_info: + fdata['l_down_watch_indexes_info']['current'] = current_info + if last_info: + fdata['l_down_watch_indexes_info']['last'] = last_info + except: + pass fdatas.append(fdata) except Exception as e: logger_debug.exception(e) @@ -1539,13 +1542,15 @@ request_id) return rate = round(rate, 2) - + old_rate = LCancelRateManager().get_cancel_rate(0)[0] # L鍚庢暟鎹揩鐓� last_info = LCancelBigNumComputer().statistic_l_down_watch_indexes_info(code) LDownCancelWatchIndexStatisticManager().set_statistic_info(code, last_info) CancelRateHumanSettingManager().set_l_down(code, rate) # L鍚庨噸鏂板泭鎷� - LCancelBigNumComputer().re_compute_l_down_watch_indexes(code) + if rate < old_rate: + # 鏀瑰皬鎵嶈兘閲嶆柊鍥婃嫭 + LCancelBigNumComputer().re_compute_l_down_watch_indexes(code) self.send_response({"code": 0, "data": {}}, client_id, request_id) -- Gitblit v1.8.0