lekss361
|
dd3c126e4a
|
refactor(workers): split celery_app.py god-object into 3 modules
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
|
2026-05-15 00:04:54 +03:00 |
|