fix(backend): reservation_ingest пейсинг + короткоживущая DB-сессия (#2445-D4) #2458
No reviewers
Labels
No labels
admin
analytics
auth
automation
bug
business
chore
ci
compliance
data
data-moat
docs
duplicate
dx
enhancement
Fable 5 ревью
feedback/max
generative
GG-форсайт
needs-discussion
needs-human
observability
pause-bots
performance
priority/p0
priority/p1
priority/p2
priority/p3
scope/backend
scope/db
scope/devops
scope/frontend
scope/qa
scrapers
security
site-finder
stage/1
stage/2
status/blocked
status/done
status/needs-analysis
status/needs-fix
status/qa
status/ready
status/review
status/wip
tech-debt
tradein
ux
week ревью 1
wontfix
вторичка
ИРД
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: lekss361/gendesign#2458
Loading…
Add table
Reference in a new issue
No description provided.
Delete branch "fix/reservation-pacing-session"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
Аудит-находка D4 (epic #2445, WAF-гигиена #2443).
reservation_ingest.pyдержал SQLAlchemy-сессию открытой через каждый внешний PDF-fetch в циклах (connection-pool risk), аpravo_gov66_client.pyне имел пейсинга/backoff (тот же risk shape, что WAF-бан ДОМ.РФ).Fix
SessionLocal(), открываемую только вокруг upsert. Внешние fetch'и (get_document_pdf_url/fetch_pdf) теперь без открытой сессии._get_with_backoffв pravo-клиенте:time.sleep(0.4)пейсинг перед каждым запросом + 429/5xx экспоненциальный backoff (по образцуgisogd66._get_json).Test plan
CASTсоблюдёнRefs #2445