From 37f72b53cc2ef3ffb211c83e92b920318a5a89df Mon Sep 17 00:00:00 2001
From: Administrator <admin@example.com>
Date: 星期五, 12 七月 2024 14:29:31 +0800
Subject: [PATCH] 将server与api独立出来

---
 huaxin_client/l1_client.py |   11 +++++++++--
 1 files changed, 9 insertions(+), 2 deletions(-)

diff --git a/huaxin_client/l1_client.py b/huaxin_client/l1_client.py
index aba54d9..aaa608f 100644
--- a/huaxin_client/l1_client.py
+++ b/huaxin_client/l1_client.py
@@ -266,7 +266,8 @@
             list_ = [level1_data_dict[k] for k in level1_data_dict]
             flist = []
             plist = []
-            threshold_rate = constant.L1_MIN_RATE_PRE if int(tool.get_now_time_str().replace(":", "")) < int(
+            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
             for d in list_:
                 if d[2] >= threshold_rate:
@@ -275,7 +276,13 @@
                 if d[0] in __position_codes:
                     plist.append(d)
             flist.sort(key=lambda x: x[2], reverse=True)
-            datas = flist[:1000]
+            # 姝e紡浜ゆ槗涔嬪墠鍏堝鐞嗘瘮杈冨皯鐨勬暟鎹紝涓嶇劧澶勭悊鏃堕棿涔呴�犳垚鏁版嵁鎷ュ牭
+            MAX_COUNT = 1000
+            if now_time_int < int("092600"):
+                MAX_COUNT = 100
+            elif now_time_int < int("092800"):
+                MAX_COUNT = 200
+            datas = flist[:MAX_COUNT]
             # 灏嗘寔浠撹偂鍔犲叆杩涘幓
             datas.extend(plist)
             if len(datas) > 0:

--
Gitblit v1.8.0