完善成员画像定时任务的周月摘要补偿策略

This commit is contained in:
liuwei
2026-04-24 16:05:37 +08:00
parent 2ba213b120
commit 2b8a5d0ce6
2 changed files with 42 additions and 42 deletions

View File

@@ -127,8 +127,12 @@ class MemberContextPlugin(MessagePluginInterface):
# 兼容“指定群执行”的场景;若未指定则沿用全量刷新逻辑。
target_groups = [str(g).strip() for g in (context.get("target_groups") or []) if str(g).strip()]
enable_weekly = action_key == "weekly_refresh"
enable_monthly = action_key == "monthly_refresh"
# 调度层补偿策略:
# 1. 周任务除了补周摘要,也顺手检查月摘要缺口;
# 2. 月任务先补齐缺失周摘要,再继续补月摘要,避免“月摘要依赖周摘要但周摘要没补上”;
# 3. 日任务仍保持轻量,不主动放大到全量周/月补偿。
enable_weekly = action_key in {"weekly_refresh", "monthly_refresh"}
enable_monthly = action_key in {"weekly_refresh", "monthly_refresh"}
try:
if target_groups: