feat(matrix): 「第一条视频」改成主页最早一条,后台翻页扫描 + 缓存
Deploy VitePress site to Pages / build (push) Canceled after 0s
Deploy VitePress site to Pages / Deploy (push) Canceled after 0s

要的是这个博主**最早发的**那条(可能根本不在监控目标里),不是主页第一屏。
按游标翻到底才知道,所以:

- 新增 monitor_creator_first_video 缓存表,按 sec_uid 存最早发布时间,
  30 天内不再扫;
- 调度器后台任务慢慢扫(每页 20 条、页间 0.5 秒、单次最多 50 页 / 3 分钟),
  不占调度循环;
- 矩阵只读缓存,读不到退回库里最早的一条作品;
- 失败只锁 6 小时再试,不会把没扫到的号锁 30 天。

同时撤掉上一版「每轮采集多问一次主页最新视频」的实现(方向反了)。
This commit is contained in:
2026-11-02 11:07:48 +08:00
parent 34a962f75a
commit 6c2c8faf1d
11 changed files with 494 additions and 188 deletions
-1
View File
@@ -718,7 +718,6 @@ async def _ingest_creator_stats(
total_favorited=parse_count(record.get("total_favorited")),
works_count=parse_count(record.get("works")),
following=parse_count(record.get("following")),
latest_published_at=record.get("latest_published_at"),
captured_at=now,
)
)