Commit Graph
30 Commits
Author SHA1 Message Date
bot-ci f408da93c2 feat(scheduler): persist task state/progress/due_at across restart (#8)
Replace process-start next_run=0 guesses with kv task:state records
(status, due_at, stat_date, progress). Startup recovers stale running,
honors future due_at for delayed retries, and resumes the same
stat_date. Seed only enqueues evening seal; seal force keeps non-seed
ok=1 as progress (keep_scraped). Keeps !7 fail-logging and cleanup retry.
2026-11-03 01:50:00 +08:00
bot-ci bb18d232f6 feat(scheduler): add snapshot-seed CLI and 10m seed deferral
Add `python app.py snapshot-seed [--date]` (offline clone, Debian /
docker compose exec friendly). When seed fires while full-site snapshot
is running, or last_completed is missing (no_source), record skip as
non-success and retry in 10 minutes until a real seed succeeds; fans
and quiet-window rules unchanged.
2026-11-03 00:22:11 +08:00
bot-ci 9969e65202 fix(scheduler): drop cross-task mutex, quiet window + retry
Incident: evening full snapshot could be recorded as ok with
already_completed/elapsed=0 after mutual skip with hourly sync, then
next_run jumped to the next day.

- Full-site snapshot never skips because another task is running
- 23:00-01:00 Asia/Shanghai: defer discovery / snapshot_recent /
  candidate_cleanup to after 01:00; fans never defers
- Skip records ok=false + skipped=true (not success / not completed)
- Skip/fail reschedule soon (~5m); daily success still next snapshot_at
- TaskControl return value drives next_run; system UI shows skip fields
2026-11-03 00:07:19 +08:00
kairee 00572a3429 fix(growth): require a 1000-view baseline on the rate board
Keep small-base videos on the delta board only, and raise the smoothing prior to 1000 so videos that just clear the floor do not dominate the ranking.
2026-11-02 22:11:30 +08:00
kairee 39a6537f67 fix(growth): rank the rate board by a smoothed score
Show the real percentage on the card, but sort with delta / (baseline + prior) so a small baseline cannot dominate. Same-day publishes stay off the rate board.
2026-11-02 22:06:41 +08:00
kairee 9412475473 Merge branch 'main' into cursor/same-day-growth-baseline 2026-11-02 20:45:30 +08:00
kairee c5b7185675 feat(growth): same-day 1-day baselines for new videos
Let 1-day view growth use a zero baseline for videos published today, and the first successful sample for older videos ingested today, without mixing those into 7/30-day rankings.
2026-11-02 20:44:17 +08:00
bot-ci 3254648849 fix(system): sort recent tasks by started_at desc
「最近任务」原先按 kv 键名排序。改为后端 `_task_records` 按
started_at 倒序写入 dict(缺开始时间排末尾,含进行中);
前端不再参与排序。配套 test_system_tasks_sorted_by_started_at_desc。
2026-11-02 19:52:46 +08:00
bot-ci 8a9cb21408 feat: EOD 23:15 seal + midnight seed shell for video/fans
Move daily snapshot/fans to 23:15 and add 00:01 seed that clones
last_completed ok=1 rows into today without advancing completed.
Evening runs force through seed markers; growth previous is per-aid
adjacent. Home shows short-update clock + 全站数据 date, and 收录视频
counts.
2026-11-02 12:38:55 +08:00
bot-ci 297d9279d8 fix(home): server-owned growth window; expose days
Home omits growth_days; backend auto (or home_growth_days 1/7) picks
the window. Response includes days alongside growth_days. Growth榜 link
uses the returned days. Non-growth sorts treat omitted/auto as 7.
2026-11-02 10:05:00 +08:00
bot-ci 9163f47b76 feat: home growth auto(7→1) and hourly recent-video snapshot
- Add analytics.home_growth_days (auto|1|7); API growth_days=auto tries 7 then 1
- Homepage shows active window and growth-board link; clearer empty reason
- New snapshot_recent scheduler task (schedule.recent_snapshot_minutes/days)
- run_recent_videos refreshes new aids only; never touches completed/backup
- Full 00:01 job keeps ok=1 skip (covers hourly refresh within 1h); mutex with recent
2026-11-02 10:00:02 +08:00
bot-ci af90ce8f87 fix(system): three next-runs, completed-date data_date, running mark
Split /system schedule into fans / snapshot+UP / discovery next-runs.
Drive data_date and snapshot_days from fully completed video snapshots
only, keep prior success date on failure, show task failure records, and
mark in-progress tasks as 运行中 without wall-clock next-run jumps.
2026-11-02 00:46:20 +08:00
kairee 003e65086e fix(web): up list search matches up name only, not video titles 2026-11-01 17:57:34 +08:00
kairee 84ce1e41e8 feat(web): visit 204 response, up page header/sort, trim system page 2026-11-01 17:06:26 +08:00
kairee 3c16caac1a feat(stats): buffer visits in memory and expose POST /api/visit + /api/stats 2026-11-01 15:34:53 +08:00
kairee 5d7521075a feat(web): show first-RE time on up page, drop decoupled folder badges 2026-11-01 14:41:32 +08:00
kairee 2ff3e7952b feat(web): up avatars, follower count, and dedupe views/avg secondary 2026-11-01 14:34:23 +08:00
kairee 6c4287b43a refactor(sync): drop favorite-folder tracking and deal 2026-11-01 13:59:10 +08:00
kairee 9be7d1cab2 feat(web): dropdown sort and time filters with year support 2026-11-01 12:45:40 +08:00
kairee bc3bef0743 fix(analytics): shrink video efficiency and gate noisy boards by views 2026-11-01 12:25:27 +08:00
kairee e7034cfb84 feat(analytics): lower maturity window to 2 days and reword about page 2026-11-01 12:07:47 +08:00
kairee 5a656d42a8 feat(web): add duration efficiency rankings and about payload 2026-11-01 11:21:42 +08:00
kairee 9fd277c05f feat(web): cache dashboard aggregations with version invalidation 2026-11-01 03:27:49 +08:00
kairee 274eccba93 feat(web): add fan date range modes and delta column 2026-11-01 02:36:48 +08:00
kairee d8e9a7b0f0 feat(web): show cumulative fan range and limit recent records 2026-11-01 02:14:10 +08:00
kairee c2ef998720 feat(web): refresh palette, simplify ranking toolbar and drop export 2026-11-01 00:37:20 +08:00
kairee f9a5478800 fix(web): fix UP card layout and fan delta semantics 2026-11-01 00:06:43 +08:00
kairee 7fcd1db987 fix(web): count initial import from tracked videos 2026-10-31 23:54:56 +08:00
kairee 257fbe009b fix(web): align trend ranges, next runs and preview task records 2026-10-31 23:46:49 +08:00
kairee 19572171b8 feat(web): add read-only dashboard server and query layer 2026-10-31 23:13:54 +08:00