lekss361
|
7eb686bd7d
|
feat(permits): Celery beat monthly + analyze recent_permits (#105 Phase 4+5)
Closes #105 (Phase 3 geocoding — отдельный issue).
Phase 4: 'ekburg-permits-monthly' crontab(0 2 1 * *) → tasks.refresh_all
Phase 5: /analyze returns engineering.recent_permits_in_quarter +
permits_summary (rns/rve counts/area/units, by_developer top-3)
Filter: quarter prefix (3-segment cadastral match). Spatial 500m radius —
после Phase 3 geocoding.
Tests: test_analyze_recent_permits.py (3 mock), comment updates на
inline_weights/market_price (shifted execute ordering).
|
2026-05-16 15:03:01 +03:00 |
|
lekss361
|
6a256bfc1f
|
refactor(workers): split celery_app.py god-object into 3 modules (#135)
Per audit batch #127 P3 god objects (issue #134).
Split layout:
- celery_app.py: 270 → 35 lines (config only)
- beat_schedule.py: 207 lines NEW (DB-driven + fallback + hardcoded)
- lifecycle.py: 168 lines NEW (worker_process_init + worker_ready handlers)
No business logic changes — move-only structural refactor. Public API
(celery_app.conf.beat_schedule) unchanged.
Verify:
- beat keys: kn-region-66, objective_sync, refresh-ekb-districts-medians,
nspd-geo-zombie-cleanup, poi-sync-weekly, noise-sync-weekly
- ruff + ruff-format clean
- AST parse OK
Vault: Module_Beat_Schedule + Module_Worker_Lifecycle NEW;
Module_Celery_App updated.
Closes #134
Refs: #127
Co-authored-by: lekss361 <claudestars@proton.me>
|
2026-05-15 00:09:38 +03:00 |
|