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.
This commit is contained in:
1 parent
8e7ead1669
commit
c5b7185675
21 files changed
+411
-59
No files matched your search
@@ -237,8 +237,8 @@ def _insert_snapshot(
|
||||
"""
|
||||
INSERT OR REPLACE INTO snapshot(
|
||||
stat_date, aid, "view", "like", favorite, coin, share, reply,
|
||||
danmaku, captured_at, ok, err, src
|
||||
) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, 'preview')
|
||||
danmaku, captured_at, ok, err, src, view_open, open_captured_at
|
||||
) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, 'preview', ?, ?)
|
||||
""",
|
||||
(
|
||||
stat_date,
|
||||
@@ -253,6 +253,8 @@ def _insert_snapshot(
|
||||
int(captured_at),
|
||||
1 if ok else 0,
|
||||
err,
|
||||
values.get("view") if ok else None,
|
||||
int(captured_at) if ok else None,
|
||||
),
|
||||
)
|
||||
|
||||
|
||||
Reference in new issue
Block a user