gendesign/backend/app/workers
Light1YT 1db488ba99 feat(workers): supply-layers refresh task + weekly beat (#950 Step 5)
Celery task tasks.supply_layers_refresh computes L1/L2/L3 supply layers per
Sverdlovsk district via supply_layers.compute_all_layers and UPSERTs into
supply_layers (m.125) on uq_supply_layers_logical, updating all mutable cols
(units/area/expected_online_date/confidence/method/computed_at), never the key.
Coherent single date.today() snapshot_date across the batch; per-row SAVEPOINT
(begin_nested) so a bad row/district can't abort the weekly batch; per-district
guard. District set is data-driven (UNION of objective_lots.district and
domrf_kn_objects.district_name region_cd=66), not hardcoded.

Registered weekly Mon 06:00 МСК (after scrape_kn 04:15 that refreshes free_flats,
the L2 source). Adds the task module to celery_app include (beat resolves by
name). 11 unit tests asserting the ON CONFLICT contract + savepoint + coherent
snapshot.
2026-06-03 01:45:30 +05:00
..
tasks feat(workers): supply-layers refresh task + weekly beat (#950 Step 5) 2026-06-03 01:45:30 +05:00
__init__.py init 2026-04-25 13:45:19 +03:00
beat_schedule.py feat(workers): supply-layers refresh task + weekly beat (#950 Step 5) 2026-06-03 01:45:30 +05:00
celery_app.py feat(workers): supply-layers refresh task + weekly beat (#950 Step 5) 2026-06-03 01:45:30 +05:00
lifecycle.py refactor(workers): split celery_app.py god-object into 3 modules (#135) 2026-05-15 00:09:38 +03:00