feat: 调整高价值福袋参与阈值,优化预约逻辑以提升用户体验
This commit is contained in:
1 parent
1283645b75
commit
3fbd2b2d85
3 files changed
+12
-10
No files matched your search
@@ -189,7 +189,7 @@ class fudai_analyse:
|
|||||||
# 高价值阈值(元)
|
# 高价值阈值(元)
|
||||||
self.high_value_fudai_threshold_yuan: float = 500.0
|
self.high_value_fudai_threshold_yuan: float = 500.0
|
||||||
# 提前参与秒数:开奖前 N 秒回到该直播间并参与
|
# 提前参与秒数:开奖前 N 秒回到该直播间并参与
|
||||||
self.high_value_fudai_join_ahead_seconds: int = 300
|
self.high_value_fudai_join_ahead_seconds: int = 100
|
||||||
# 从当前位置最多回滑多少次以回到预约直播间
|
# 从当前位置最多回滑多少次以回到预约直播间
|
||||||
self.high_value_fudai_max_swipe_back: int = 35
|
self.high_value_fudai_max_swipe_back: int = 35
|
||||||
# 同时记录的最大预约数量
|
# 同时记录的最大预约数量
|
||||||
@@ -2994,7 +2994,7 @@ class fudai_analyse:
|
|||||||
# 获取"预约参与阈值"配置
|
# 获取"预约参与阈值"配置
|
||||||
join_ahead_seconds = int(
|
join_ahead_seconds = int(
|
||||||
getattr(
|
getattr(
|
||||||
self, "high_value_fudai_join_ahead_seconds", 300
|
self, "high_value_fudai_join_ahead_seconds", 100
|
||||||
)
|
)
|
||||||
or 120
|
or 120
|
||||||
)
|
)
|
||||||
@@ -3895,7 +3895,7 @@ class fudai_analyse:
|
|||||||
if ft > 0:
|
if ft > 0:
|
||||||
join_ahead = float(
|
join_ahead = float(
|
||||||
getattr(
|
getattr(
|
||||||
self, "high_value_fudai_join_ahead_seconds", 300
|
self, "high_value_fudai_join_ahead_seconds", 100
|
||||||
)
|
)
|
||||||
or 120
|
or 120
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -4862,10 +4862,10 @@ def basic_join_decision(
|
|||||||
# 获取"预约参与阈值"配置
|
# 获取"预约参与阈值"配置
|
||||||
try:
|
try:
|
||||||
join_ahead_seconds = int(
|
join_ahead_seconds = int(
|
||||||
getattr(analyser, "high_value_fudai_join_ahead_seconds", 120) or 120
|
getattr(analyser, "high_value_fudai_join_ahead_seconds", 100) or 100
|
||||||
)
|
)
|
||||||
except Exception:
|
except Exception:
|
||||||
join_ahead_seconds = 120
|
join_ahead_seconds = 100
|
||||||
|
|
||||||
# 如果剩余秒数在"预约参与阈值"内,则立即参与而不是预约
|
# 如果剩余秒数在"预约参与阈值"内,则立即参与而不是预约
|
||||||
if remain_seconds is not None and remain_seconds <= join_ahead_seconds:
|
if remain_seconds is not None and remain_seconds <= join_ahead_seconds:
|
||||||
@@ -5118,10 +5118,10 @@ def basic_join_decision(
|
|||||||
# 如果剩余秒数 <= 这个阈值,立即参与;否则记录预约
|
# 如果剩余秒数 <= 这个阈值,立即参与;否则记录预约
|
||||||
try:
|
try:
|
||||||
join_ahead_seconds = int(
|
join_ahead_seconds = int(
|
||||||
getattr(analyser, "high_value_fudai_join_ahead_seconds", 120) or 120
|
getattr(analyser, "high_value_fudai_join_ahead_seconds", 100) or 100
|
||||||
)
|
)
|
||||||
except Exception:
|
except Exception:
|
||||||
join_ahead_seconds = 120
|
join_ahead_seconds = 100
|
||||||
|
|
||||||
# 如果剩余秒数在"预约参与阈值"内(<= 阈值),立即参与而不是记录预约
|
# 如果剩余秒数在"预约参与阈值"内(<= 阈值),立即参与而不是记录预约
|
||||||
if remain_seconds is not None and remain_seconds <= join_ahead_seconds:
|
if remain_seconds is not None and remain_seconds <= join_ahead_seconds:
|
||||||
|
|||||||
@@ -1089,7 +1089,9 @@ def process_reservation_attend_window(
|
|||||||
|
|
||||||
# 用于锁定期判断/匹配的轮询提前量(允许为 0,禁止为负数)
|
# 用于锁定期判断/匹配的轮询提前量(允许为 0,禁止为负数)
|
||||||
try:
|
try:
|
||||||
poll_before = 0.0
|
poll_before = float(
|
||||||
|
getattr(analyser, "high_value_fudai_poll_before_seconds", 10.0) or 10.0
|
||||||
|
)
|
||||||
except Exception:
|
except Exception:
|
||||||
poll_before = 10.0
|
poll_before = 10.0
|
||||||
poll_before = max(0.0, poll_before)
|
poll_before = max(0.0, poll_before)
|
||||||
@@ -1335,10 +1337,10 @@ def process_reservation_attend_window(
|
|||||||
# 仅在"即将开奖窗口"(包括已过一小段时间)内才触发回退
|
# 仅在"即将开奖窗口"(包括已过一小段时间)内才触发回退
|
||||||
try:
|
try:
|
||||||
join_ahead = float(
|
join_ahead = float(
|
||||||
getattr(analyser, "high_value_fudai_join_ahead_seconds", 120) or 120
|
getattr(analyser, "high_value_fudai_join_ahead_seconds", 100) or 100
|
||||||
)
|
)
|
||||||
except Exception:
|
except Exception:
|
||||||
join_ahead = 120.0
|
join_ahead = 100.0
|
||||||
|
|
||||||
# poll_before 已在函数前部统一计算
|
# poll_before 已在函数前部统一计算
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user