gendesign/backend/tests/workers
Light1YT 06c4bb9fd6
All checks were successful
Deploy / changes (push) Successful in 5s
Deploy / build-frontend (push) Has been skipped
Deploy / build-backend (push) Successful in 1m41s
Deploy / build-worker (push) Successful in 2m37s
Deploy / deploy (push) Successful in 1m18s
CI / changes (pull_request) Successful in 6s
CI / changes (push) Successful in 7s
CI / backend-tests (pull_request) Has been skipped
CI / frontend-tests (pull_request) Has been skipped
CI / backend-tests (push) Has been skipped
CI / frontend-tests (push) Has been skipped
fix(workers): count lots_pf failure correctly, no silent 'done' (#1220)
scrape_objective.sync_objective_group инкрементировал n_requests и reports_ok
ДО HTTP-стрима client.stream_report(...). Любая ошибка стрима (ObjectiveAuthError,
ObjectiveAPIError — оба ⊂ RuntimeError ⊂ Exception, ijson-сбой, обрыв сети)
проглатывалась generic except Exception в lots_pf-ветке без инкремента
reports_failed и без re-raise. Внешний except (ObjectiveAuthError|APIError)
был НЕДОСТИЖИМ для lots_pf. _finish_run(status='done' if reports_failed==0)
помечал run УСПЕШНЫМ при полностью провалившемся главном 600МБ отчёте «Лоты».
objective_lots/history оставались stale молча, админка показывала last_run_at,
downstream supply-layers L2 видел 'done', rows_lots=0.

Patch (зеркалит corp_sum — там паттерн уже правильный):
- n_requests/reports_ok перенесены ИЗ pre-HTTP в after-success (после
  успешного commit'а внутри `with stream_report(...)`).
- В except Exception lots_pf-ветке: n_requests += 1 + reports_failed += 1
  + logger.exception (с traceback). Graceful (no re-raise) сохранён —
  sibling jobs продолжают, но статус run теперь честный.
- corp_sum ветка не тронута. _finish_run сигнатура не меняется.

5 новых регрессионных тестов: success keeps reports_ok=1, auth-error /
api-error / generic Exception в lots_pf инкрементируют reports_failed (не
ok), _finish_run status='failed' при reports_failed>0. ruff clean.

Closes #1220
2026-06-13 07:34:57 +00:00
..
tasks fix(workers): count lots_pf failure correctly, no silent 'done' (#1220) 2026-06-13 07:34:57 +00:00
test_cbr_macro_sync.py feat(macro): CBR inflation (ИПЦ YoY) -> macro_indicator + activate §9.5 channel (#946) 2026-06-08 11:41:14 +05:00
test_genplan_zones_sync.py fix(sf): ST_MakeValid genplan geom + backfill 881 invalid polygons (#1157) 2026-06-07 17:59:04 +00:00
test_ird_harvest.py fix(sf): per-quarter commit в ird/opportunity harvest — не терять прогресс при краше (#1107) 2026-06-06 21:47:35 +00:00
test_krt_geometry_sync.py perf(sf): КРТ-геометрия в БД, _krt_at из БД вместо живого WFS (#1139) 2026-06-07 12:14:35 +00:00
test_nspd_geo.py fix(nspd_geo): split zombie thresholds running=6m / paused=30m (#1215) 2026-06-13 05:37:08 +00:00
test_opportunity_harvest.py feat(sf): opportunity-ЗУ harvest → ird_overlays (future-supply, #1100) 2026-06-06 19:32:45 +00:00
test_planning_harvest.py feat(sf): ППТ/ПМТ WFS ingest → planning_projects (future-supply, #1104) 2026-06-06 20:25:23 +00:00
test_reservation_ingest.py feat(sf): enumerate изъятия/резервирования с pravo.gov66 → land_reservation (#1145) 2026-06-07 13:56:29 +00:00
test_rosstat_macro_sync.py feat(macro): land construction price index (СМР) via open Rosstat xlsx (#946) 2026-06-09 11:28:05 +05:00
test_scrape_cadastre.py perf(cadastre): freshness skip + grid-walk heartbeat + log noise reduction (#187) 2026-05-15 23:02:37 +03:00
test_scrape_kn_catalog_objects.py feat(22d): catalog scraper — skip-today filter + force flag (#348) 2026-05-17 23:15:22 +00:00
test_supply_layers_refresh.py fix(supply-layers): thread dev_group_name into L3 upsert key (#970 CRITICAL) 2026-06-04 10:06:30 +05:00
test_zone_regulation_refresh.py feat(sf): прогрев zone_regulation_cache по терзонам ЕКБ (#1106) 2026-06-06 21:04:52 +00:00