From a724de409448330925af6db4ecc6aab92d13ea51 Mon Sep 17 00:00:00 2001 From: Your Name Date: Sat, 17 Jan 2026 08:59:18 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E6=9B=B4=E6=96=B0=E9=A2=84=E7=BA=A6?= =?UTF-8?q?=E9=80=BB=E8=BE=91=EF=BC=8C=E5=85=81=E8=AE=B8=E5=9C=A8=E6=88=90?= =?UTF-8?q?=E5=8A=9F=E9=A2=84=E7=BA=A6=E5=90=8E=E7=BB=A7=E7=BB=AD=E8=BF=9B?= =?UTF-8?q?=E8=A1=8C=E5=86=B3=E7=AD=96=E8=80=8C=E9=9D=9E=E7=9B=B4=E6=8E=A5?= =?UTF-8?q?=E8=BF=94=E5=9B=9E?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- douyin/fudai/douyin_fudai_core.py | 39 +++++-------------------------- 1 file changed, 6 insertions(+), 33 deletions(-) diff --git a/douyin/fudai/douyin_fudai_core.py b/douyin/fudai/douyin_fudai_core.py index 8c6fe5d..36caf1b 100644 --- a/douyin/fudai/douyin_fudai_core.py +++ b/douyin/fudai/douyin_fudai_core.py @@ -5694,7 +5694,7 @@ def basic_join_decision( try: analyser._log_kv( "预约", - "basic_join_decision:已更新预约队列中的福袋信息", + "basic_join_decision:已更新预约队列中的福袋信息,继续进行决策", value_yuan=prize_value_yuan, future_ts=int(future_ts), room_pos=room_pos, @@ -5702,16 +5702,11 @@ def basic_join_decision( ) except Exception: pass - - # 更新预约成功后,直接返回,不参与抽奖 - elapsed = time.time() - start_time - analyser._log_kv( - "参与", - "basic_join_decision完成(更新预约)", - elapsed_seconds=round(elapsed, 2), - ) - return True - + + # 更新预约成功后,继续进行决策而不是直接返回 + # 设置标志表示预约已更新,后续决策会考虑这个信息 + reservation_updated = True + except Exception as e: try: analyser._log_kv( @@ -5723,28 +5718,6 @@ def basic_join_decision( except Exception: pass existing_reservation = None # 强制新增 - - # 如果没有现有预约或更新失败,则新增预约 - if existing_reservation is None: - - def _add_reservation_with_flag(q, item): - queue_full_flag[0] = douyin_reservation_logic.add_reservation_core_logic( # type: ignore[attr-defined] - q, - item, - max_reservations=int( - getattr( - analyser, "high_value_fudai_max_reservations", 3 - ) - or 3 - ), - analyser=analyser, - write_state_callback=_write_reservation_state, - ) - - # 获取任务数量和其他详情信息(优先从缓存的福袋详情获取) - task_count = 2 # 默认2个任务 - time_text = "" - participants = 0 copies = 0 try: # 优先从缓存的福袋详情中获取信息