gendesign/backend/app/services
lekss361 e695bca1e4
fix(cadastre): remove shared phase_state early-exit (race condition) (#183)
cadastre_jobs.phase_state is shared between ALL parallel Celery workers
of the same job. The early-exit triggered as soon as the FIRST worker
wrote phase=done via progress_cb — all subsequent workers (reading same
shared row) bailed without work.

Effect: pilot v7 made 5 NSPD requests for 50 quarters (=0.1/quarter).
Full ekb_full job #8: 4950 req / 2408 quarters = 2/quarter — 95% workers
early-exited without doing snapshot phase.

Root cause of 1.6% parcels coverage. Fix A/B/C only partially helped
because most workers never reached Phase 1/1.5.

Solution: delete the early-exit. Idempotency is guaranteed by
ON CONFLICT DO UPDATE in every upsert_* — re-enqueued tasks
write same rows without duplicates.

Closes part of #168 (root-cause fix for race condition revealed by #182 metrics).

Co-authored-by: lekss361 <claudestars@proton.me>
2026-05-15 17:41:27 +03:00
..
cadastre fix(cadastre): remove shared phase_state early-exit (race condition) (#183) 2026-05-15 17:41:27 +03:00
exporters init 2026-04-25 13:45:19 +03:00
generative deploy.yml: sync compose+Caddyfile from git, reload caddy after up 2026-04-26 13:31:26 +03:00
photos fix ui lag 2026-04-27 20:26:55 +03:00
scrapers feat(scrapers): search_by_quarter orchestrator + QuarterDump (#94 pt.2/4) (#109) 2026-05-12 18:11:30 +03:00
site_finder feat(velocity): per-room-bucket breakdown in VelocityResult (#163) 2026-05-15 10:09:03 +03:00
__init__.py init 2026-04-25 13:45:19 +03:00
analytics_queries.py feat(velocity): migrate D2 sales source → objective_corpus_room_month (#158) 2026-05-15 09:34:00 +03:00
analytics_refresh.py fix(scrape): SQLAlchemy text() парсил ':00:' regex как named-param 2026-04-30 23:16:11 +03:00
job_settings.py feat(jobs): centralized job_settings API + DB-driven beat schedule 2026-05-11 15:38:13 +03:00
objective_etl.py fix(worker): port objective_etl from psycopg2 → psycopg v3 2026-05-11 12:07:57 +03:00
objective_sync_config.py feat(objective): full sync pipeline + dynamic admin config 2026-05-10 19:54:15 +03:00