feat(avito): incremental daily + exhaustive weekly schedule split (+ scheduler interval_days) #1770
No reviewers
Labels
No labels
admin
analytics
auth
automation
bug
business
chore
ci
compliance
data
data-moat
docs
duplicate
dx
enhancement
Fable 5 ревью
feedback/max
generative
GG-форсайт
needs-discussion
needs-human
observability
pause-bots
performance
priority/p0
priority/p1
priority/p2
priority/p3
scope/backend
scope/db
scope/devops
scope/frontend
scope/qa
scrapers
security
site-finder
stage/1
stage/2
status/blocked
status/done
status/needs-analysis
status/needs-fix
status/qa
status/ready
status/review
status/wip
tech-debt
tradein
ux
week ревью 1
wontfix
вторичка
ИРД
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: lekss361/gendesign#1770
Loading…
Add table
Reference in a new issue
No description provided.
Delete branch "feat/avito-incremental-schedule-split"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
What
Activates the (merged, dormant) incremental SERP engine and splits the avito full-load schedule:
avito_full_load→ flipped to incremental daily (incremental_days: 2→since = today-2d, shallow date early-stop). Avoids the deep pagination (page 36) where the 429 bans happen.avito_full_load_exhaustive(new source) → weekly full walk to refreshlast_seen_at(feeds the 10-day delisting TTL) and catch silent price edits on old listings.Pieces
run_avito_full_load(incremental_days)— when set, passessince=today-incremental_daystofetch_all_secondary;None→ exhaustive (unchanged).avito_full_loadtrigger readsincremental_daysfromdefault_params; newavito_full_load_exhaustivedispatch forces exhaustive.interval_days) —scrape_scheduleshad no interval column, so every source was hardwired daily. Addedinterval_days(fromdefault_params, default 1 = backward-compatible) tocompute_next_run_at, honored at both recurrence call sites (_claim_run, defer path). Without this, "weekly exhaustive" wasn't expressible.129—avito_full_loadgetsincremental_days: 2; newavito_full_load_exhaustiveseeded withinterval_days: 7, first run staggered toCURRENT_DATE + 3d. Idempotent (guarded UPDATE backfills the key on re-run).Why this is the core ban fix
Run 216 proved 403s recover (merged fix) but it still banned on a 429 at page 36 — deep pagination. Incremental never reaches deep pages → that vector disappears for the daily run. The weekly exhaustive (hardened separately in #1769) backstops delisting + silent price edits.
Tests
run_avito_full_load:incremental_days=2→since=today-2d;None→since=None.avito_full_load_exhaustiveroutes to exhaustive;incremental_dayspropagation.compute_next_run_at: default → +1d,interval_days=7→ +7d (in-window, incl. cross-midnight window), explicit=1→ +1d.-k "scheduler or full_load": 36 passed (focused), 318 passed across the broader avito/scheduler/full_load selection earlier. Ruff clean.Depends on the merged incremental engine (#1766). Pairs with #1769 (429-hardening for the weekly exhaustive run). Recommend reviewing/merging #1769 alongside or before flipping, so the weekly exhaustive is ban-resilient on day one.