fix(celery): disable nspd-harvest beat (Bug post-mortem #1, time-sensitive) #121

Merged
lekss361 merged 1 commit from fix/disable-nspd-harvest-beat into main 2026-05-14 20:24:53 +00:00

View file

@ -231,16 +231,24 @@ def _build_beat_schedule() -> dict:
"options": {"queue": "celery"},
}
# NSPD quarter dump refresh — понедельник 04:00 МСК.
# Fanout'ит harvest_quarter.apply_async для кварталов старше 90 дней или
# отсутствующих в nspd_quarter_dumps. batch_size=50 — ~5 мин при 600ms rate.
# Запускается через час после poi-sync чтобы не создавать конкуренцию.
schedule["nspd-harvest-stale-quarters"] = {
"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"},
}
# NSPD quarter dump refresh — DISABLED 2026-05-14 per Bug_NSPD_WMS_NotBulk
# post-mortem (vault: fixes/Bug_NSPD_WMS_NotBulk_2026_May14.md).
#
# Action item #1: disable beat schedule до Sprint 2 fix (grid sampling
# rewrite). harvest_quarter в текущей реализации пишет почти пустые dumps
# из-за single-pixel WMS GetFeatureInfo bug. Запуск Mon 04:00 МСК потратит
# rate-limit budget и заполнит nspd_quarter_dumps мусором.
#
# Task code остаётся в tasks/nspd_sync.py — re-enable после Sprint 2 grid
# sampling rewrite (см. Bug_NSPD_WMS_NotBulk_2026_May14 → Sprint 2 fix-strategy).
# До тех пор harvest_quarter можно вызывать вручную через admin endpoint.
#
# schedule["nspd-harvest-stale-quarters"] = {
# "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