|
All checks were successful
CI / changes (push) Successful in 7s
CI / frontend-tests (push) Has been skipped
CI / changes (pull_request) Successful in 11s
CI / frontend-tests (pull_request) Has been skipped
CI / backend-tests (push) Successful in 6m28s
CI / backend-tests (pull_request) Successful in 6m27s
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 |
||
|---|---|---|
| .. | ||
| alembic | ||
| app | ||
| db/init | ||
| output | ||
| scripts | ||
| tests | ||
| .dockerignore | ||
| .env.example | ||
| .env.runtime.example | ||
| alembic.ini | ||
| debug.log | ||
| Dockerfile | ||
| pyproject.toml | ||
| uv.lock | ||