gendesign/tradein-mvp/backend
Light1YT ef0b0d0b3a feat(scheduler): add dormant Yandex Realty city-sweep (#561)
Wire a full Yandex.Недвижимость periodic city-sweep into the in-app
scheduler, shipped DISABLED (enabled=false) by design — live behavior is
intentionally unverified pending egress-IP rotation (#623). Mirrors the
existing avito_city_sweep (also currently disabled in prod).

- run_yandex_city_sweep in scrape_pipeline.py: mirrors run_avito_city_sweep
  but simpler (no houses/detail enrich) — search + save_listings per anchor,
  cooperative cancel, per-anchor exception isolation, defensive abort after
  3 consecutive anchor failures (mark_banned; YandexRealtyScraper has no
  block/rate exception classes — fetch_around swallows errors → []).
- trigger_yandex_city_sweep_run + dispatch branch in scheduler.py (faithful
  mirror of the avito trigger: claim run, fresh SessionLocal, create_task).
- Migration 078 seeds scrape_schedules row enabled=false, window 02:00-05:00
  UTC, conservative params {pages_per_anchor:2, request_delay_sec:9,
  radius_m:1500}, ON CONFLICT (source) DO NOTHING (idempotent).
- 8 unit tests (mocked scraper + save_listings, no live network/DB):
  anchor iteration, cancel mid-sweep, per-anchor isolation, consecutive-
  failure abort + reset-on-success, empty-page pagination break.

Enable later (after #623): UPDATE scrape_schedules SET enabled=true
WHERE source='yandex_city_sweep';

Closes #561
2026-05-29 13:49:28 +05:00
..
app feat(scheduler): add dormant Yandex Realty city-sweep (#561) 2026-05-29 13:49:28 +05:00
data/sql feat(scheduler): add dormant Yandex Realty city-sweep (#561) 2026-05-29 13:49:28 +05:00
scripts feat(tradein): приоритизировать DaData house-backfill на дома с листингами (accuracy #2) 2026-05-28 15:17:01 +05:00
tests feat(scheduler): add dormant Yandex Realty city-sweep (#561) 2026-05-29 13:49:28 +05:00
.dockerignore feat: add tradein-mvp subproject (Trade-In Estimator под /trade-in) 2026-05-21 00:25:39 +03:00
Dockerfile feat(tradein): persistent infra для backfill scripts (PR F) (#592) 2026-05-27 06:59:54 +00:00
pyproject.toml feat(rbac): role-based access control via X-Authenticated-User middleware (#585) 2026-05-26 06:18:40 +00:00