gendesign/tradein-mvp/backend/app
bot-backend dc7a84cf2e feat(tradein): per-anchor watchdog timeout in city sweeps (#880)
run_{avito,cian,yandex}_city_sweep had no per-anchor watchdog: a stalled HTTP
request (proxy/connection hang) blocked the asyncio task forever — heartbeat
froze mid-anchor, run stayed 'running' until the 6h zombie-detect. Live-repro:
cian sweep #24 hung on anchor 3, #29 on anchor 1.

Wrap each anchor's processing in asyncio.wait_for(coro, ANCHOR_TIMEOUT_SEC=240).
TimeoutError -> logger.warning + errors_count++ + continue (sweep finishes,
reaches mark_done). Timeout branch sits before the existing except Exception.
yandex/cian also bump consecutive_failures -> existing MAX_CONSECUTIVE_FAILURES
abort fires on 3 consecutive hung anchors. CianScraper SERP session already
has timeout=30. 5 unit tests (all 3 sweeps), network-free.

Refs #880, #581, #559
2026-05-31 13:33:39 +03:00
..
api fix(tradein): single-run guard на avito-city-sweep admin-endpoint (#874) 2026-05-31 08:55:33 +00:00
core fix(estimator): sanity-clamp quarter-index factor (#859) (#863) 2026-05-31 07:20:59 +00:00
observability feat(tradein): enrich GlitchTip SDK init — integrations + PII scrub (#396) (#643) 2026-05-29 09:23:17 +00:00
schemas docs(tradein): clarify n_analogs vs analogs[] top-10 cap (#698) (#737) 2026-05-30 15:00:48 +00:00
services feat(tradein): per-anchor watchdog timeout in city sweeps (#880) 2026-05-31 13:33:39 +03:00
tasks feat(tradein): schedule yandex address backfill task (#855) (#866) 2026-05-31 07:31:10 +00:00
__init__.py feat: add tradein-mvp subproject (Trade-In Estimator под /trade-in) 2026-05-21 00:25:39 +03:00
main.py feat(tradein): enrich GlitchTip SDK init — integrations + PII scrub (#396) (#643) 2026-05-29 09:23:17 +00:00