|
All checks were successful
CI / changes (push) Successful in 6s
CI / frontend-tests (push) Has been skipped
CI / changes (pull_request) Successful in 6s
CI / frontend-tests (pull_request) Has been skipped
CI / backend-tests (push) Successful in 6m26s
CI / backend-tests (pull_request) Successful in 6m27s
Два concurrency-бага в scrape_kn: 1. Lock value="1" без owner-токена + TTL=30мин = заявленной длительности sweep'а (нулевой запас). Sweep > TTL → lock истекает, второй sweep стартует, первый при завершении безусловным r.delete сносит ЧУЖОЙ lock → возможен третий параллельный. 2. SIGKILL/redeploy mid-sweep: finally не выполняется, lock живёт до 30 мин. worker_ready метит run 'zombie' и enqueue'ит resume_kn_run БЕЗ countdown, который ловит lock_held и возвращает skipped без retry → run теряется до недельного beat. Patch: - _region_lock: value = uuid4().hex; release через Lua check-and-delete (`if GET == ARGV[1] then DEL else 0 end`) — не сносим чужой lock. - _LOCK_TTL_SECONDS 30 → 45 мин (полтора max sweep duration, запас). - resume_kn_run: при lock_held → raise self.retry(countdown=300, max_retries=12) → ~час окно для подхвата вместо silent skip. - scrape_kn_region (scheduled) намеренно остаётся skipped — beat поднимет в следующий weekly tick (другая семантика). 11 новых юнит-тестов (token uniqueness, Lua guard, retry-not-skip, existing behaviors). 16/16 scrape_kn тестов зелёные. ruff clean. Closes #1216 |
||
|---|---|---|
| .. | ||
| __init__.py | ||
| cbr_macro_sync.py | ||
| ekb_krt_sync.py | ||
| ekb_ppt_tep_sync.py | ||
| ekburg_permits_sync.py | ||
| etl_newbuilding_crossload.py | ||
| forecast.py | ||
| genplan_zones_sync.py | ||
| gknspecial_harvest.py | ||
| ird_harvest.py | ||
| izyatie_ocr_ingest.py | ||
| krt_geometry_sync.py | ||
| location_refresh.py | ||
| noise_sync.py | ||
| nspd_denorm_backfill.py | ||
| nspd_geo.py | ||
| nspd_sync.py | ||
| objective_etl.py | ||
| okn_objects_sync.py | ||
| opportunity_harvest.py | ||
| pat_subzones_load.py | ||
| planning_harvest.py | ||
| poi_sync.py | ||
| pzz_sync.py | ||
| refresh_analytics.py | ||
| refresh_quarter_price_index.py | ||
| reservation_ingest.py | ||
| rosstat_macro_sync.py | ||
| scrape_cadastre.py | ||
| scrape_kn.py | ||
| scrape_kn_catalog_objects.py | ||
| scrape_objective.py | ||
| supply_layers_refresh.py | ||
| zone_regulation_refresh.py | ||