gendesign/tradein-mvp/backend/app/tasks
bot-backend f9769571a3
All checks were successful
CI / changes (pull_request) Successful in 7s
CI / backend-tests (pull_request) Has been skipped
CI / frontend-tests (pull_request) Has been skipped
CI / openapi-codegen-check (pull_request) Has been skipped
fix(cadastral): single-statement match UPDATE — OFFSET chunk skipped rows
The chunked matcher paged the candidate set with OFFSET over the very predicate
it mutates (building_cadastral_number IS NULL). Matched rows drop out, so OFFSET
(reset to 0 OR advanced) skips un-processed rows: once >= batch_size unmatched
listings (beyond threshold) accumulate at the low-id front, the chunk matches 0
and the loop breaks early, leaving higher-id matchable listings unfilled.
Counterexample (batch=3, matchable ids 1,4,7,10): matches 1 and 4 then breaks,
missing 7 and 10. Unit tests used single-chunk fixtures so never caught it.

The full UPDATE is ~5s for ~41k listings, so replace the loop with ONE set-based
LATERAL KNN UPDATE over all candidates — correct and fast. batch_size kept in the
signature for schedule-param compat (now unused).
2026-06-18 10:28:19 +03:00
..
__init__.py feat(tradein): search matview + indexes (Phase 3.1) (#469) 2026-05-23 14:01:18 +00:00
asking_to_sold_ratio.py fix(tradein): guard listing_segment во всех читателях listings — novostroyki вне comps (#1186) 2026-06-12 11:52:09 +03:00
avito_detail_backfill.py feat(browser): per-source proxy pool behind FEATURE_BROWSER_POOL_ENABLED (Phase 1) 2026-06-18 09:01:50 +03:00
cadastral_geo_match.py fix(cadastral): single-statement match UPDATE — OFFSET chunk skipped rows 2026-06-18 10:28:19 +03:00
cian_history_backfill.py feat(browser): per-source proxy pool behind FEATURE_BROWSER_POOL_ENABLED (Phase 1) 2026-06-18 09:01:50 +03:00
deactivate_stale_avito.py feat(scrapers): segment-aware generic deactivate_stale for yandex/cian (#1558) 2026-06-16 16:09:19 +00:00
geocode_missing.py fix(geocode): set geocode_tried_at on successful geocode UPDATE 2026-06-16 10:07:51 +03:00
listing_source_snapshot.py feat(tradein): per-source listing price history — schema + daily snapshot (#570) (#646) 2026-05-29 12:18:04 +00:00
newbuilding_enrich_backfill.py feat(tradein-scheduler): nightly newbuilding-enrichment schedule (#973) 2026-06-13 16:24:03 +05:00
refresh_search_matview.py feat(tradein): search matview + indexes (Phase 3.1) (#469) 2026-05-23 14:01:18 +00:00
rosreestr_quarter_poll.py feat(tradein): scheduled monthly Rosreestr new-quarter poll → ingest alert (#888) (#894) 2026-05-31 13:13:55 +00:00
sber_index_pull.py feat(tradein): СберИндекс monthly city-level price index pull (#887, data-layer) (#890) 2026-05-31 12:44:56 +00:00
yandex_address_backfill.py feat(tradein): schedule yandex address backfill task (#855) (#866) 2026-05-31 07:31:10 +00:00
yandex_detail_backfill.py fix(tradein): review minors — scheduler comment + save-error log label 2026-06-16 14:14:07 +03:00
yandex_newbuilding_sweep.py fix(tradein): yandex sweep — guard ext_id=NULL перед fetch_jk + cleanup httpx (#974 review M1/M3) 2026-06-15 18:41:08 +03:00