fix(#231): re-enable nspd-harvest-stale-quarters beat schedule (Sub-PR D)
После Sub-PR B (#260, merged 8ebcd15) переключения search_by_quarter на
grid-walk dispatch — beat schedule безопасно re-enable'ить:
- harvest_quarter возвращает полноценные dumps (territorial_zones + ЗОУИТ +
risk zones + engineering structures) вместо 0-3 features
- per-instance semaphore (PR #260) защищает от cross-loop binding bug
- soft/hard time_limit 600/900s — задача успевает завершиться
Schedule: Mon 01:00 UTC (04:00 МСК), batch_size=50 ограничивает WAF burst,
max_age_days=90 для регулярного refresh + новые quarters (fetched_at IS NULL).
Полный ЕКБ back-fill (11k+ quarters в cad_quarters_geom) займёт несколько
недель при batch_size=50/week; в production будет ускорено manual trigger
admin endpoint'ом если нужно.
Closes #231.
This commit is contained in:
parent
2d58c3a203
commit
d4da1b26c6
1 changed files with 15 additions and 17 deletions
|
|
@ -237,23 +237,21 @@ def build_beat_schedule() -> dict:
|
||||||
"options": {"queue": "celery"},
|
"options": {"queue": "celery"},
|
||||||
}
|
}
|
||||||
|
|
||||||
# NSPD quarter dump refresh — DISABLED 2026-05-14 per Bug_NSPD_WMS_NotBulk
|
# NSPD quarter dump refresh — re-enabled 2026-05-17 после Sub-PR B (#260)
|
||||||
# post-mortem (vault: fixes/Bug_NSPD_WMS_NotBulk_2026_May14.md).
|
# переключения search_by_quarter на grid-walk. Foundation (#247) + integration
|
||||||
|
# (#260) теперь возвращают полноценные dumps (territorial_zones, ЗОУИТ, risk
|
||||||
|
# zones, engineering structures) вместо 0-3 features из single-pixel WMS.
|
||||||
#
|
#
|
||||||
# Action item #1: disable beat schedule до Sprint 2 fix (grid sampling
|
# Schedule: Mon 04:00 МСК (01:00 UTC). batch_size=50 ограничивает fanout per
|
||||||
# rewrite). harvest_quarter в текущей реализации пишет почти пустые dumps
|
# tick — при 11k+ кварталов в cad_quarters_geom полный backfill займёт
|
||||||
# из-за single-pixel WMS GetFeatureInfo bug. Запуск Mon 04:00 МСК потратит
|
# несколько недель, но защищает от WAF rate-limit burst.
|
||||||
# rate-limit budget и заполнит nspd_quarter_dumps мусором.
|
# max_age_days=90 — refresh свежее квартала; новые / отсутствующие dumps
|
||||||
#
|
# тоже попадают через harvest_stale_quarters (берёт NULL fetched_at).
|
||||||
# Task code остаётся в tasks/nspd_sync.py — re-enable после Sprint 2 grid
|
schedule["nspd-harvest-stale-quarters"] = {
|
||||||
# sampling rewrite (см. Bug_NSPD_WMS_NotBulk_2026_May14 → Sprint 2 fix-strategy).
|
"task": "tasks.nspd_sync.harvest_stale_quarters",
|
||||||
# До тех пор harvest_quarter можно вызывать вручную через admin endpoint.
|
"schedule": _parse_cron("0 1 * * mon"), # 01:00 UTC = 04:00 МСК
|
||||||
#
|
"kwargs": {"region_code": 66, "max_age_days": 90, "batch_size": 50},
|
||||||
# schedule["nspd-harvest-stale-quarters"] = {
|
"options": {"queue": "celery"},
|
||||||
# "task": "tasks.nspd_sync.harvest_stale_quarters",
|
}
|
||||||
# "schedule": _parse_cron("0 4 * * mon"),
|
|
||||||
# "kwargs": {"region_code": 66, "max_age_days": 90, "batch_size": 50},
|
|
||||||
# "options": {"queue": "celery"},
|
|
||||||
# }
|
|
||||||
|
|
||||||
return schedule
|
return schedule
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue