From 2ba213b12034975dcac05bbb1b1f882bacef0fb1 Mon Sep 17 00:00:00 2001 From: liuwei Date: Fri, 24 Apr 2026 15:57:43 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E5=91=A8=E6=9C=88=E7=94=BB?= =?UTF-8?q?=E5=83=8F=E5=88=B7=E6=96=B0=E8=A2=AB=E6=96=B0=E9=B2=9C=E5=BA=A6?= =?UTF-8?q?=E5=88=A4=E6=96=AD=E6=8F=90=E5=89=8D=E8=B7=B3=E8=BF=87=E7=9A=84?= =?UTF-8?q?=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- plugins/member_context/service.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/plugins/member_context/service.py b/plugins/member_context/service.py index 589b2d5..fb3406a 100644 --- a/plugins/member_context/service.py +++ b/plugins/member_context/service.py @@ -322,7 +322,13 @@ class MemberContextService: ) continue existing_context = self.member_context_db.get_member_context(chatroom_id, wxid) - if not self._should_refresh_context(existing_context, active_member): + # 周/月刷新不能再完全复用“画像是否新鲜”的跳过逻辑: + # 1. 现在 weekly_refresh/monthly_refresh 虽然被调度执行,但如果画像 24h 内刚更新过, + # 成员会在这里直接跳过,后面的 digest pipeline 根本不会运行; + # 2. 这会导致 t_member_digest 的 weekly/monthly 长期不产出,体感上就像“定时任务没跑”; + # 3. 因此这里把“是否需要刷新画像”和“是否需要推进周/月摘要流水线”拆开判断。 + force_digest_pipeline = bool(enable_weekly_digest or enable_monthly_digest) + if not force_digest_pipeline and not self._should_refresh_context(existing_context, active_member): skipped += 1 self.LOG.debug( f"[成员交互摘要] 跳过成员(画像仍新鲜): group={chatroom_id}, "