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. |
||
|---|---|---|
| .. | ||
| api | ||
| integration | ||
| scrapers | ||
| services | ||
| smoke | ||
| sql | ||
| workers | ||
| __init__.py | ||
| test_admin_weight_profiles.py | ||
| test_concepts_stub.py | ||
| test_gate_verdict.py | ||
| test_health.py | ||
| test_layout_signature.py | ||
| test_layout_tz_pdf.py | ||
| test_nspd_client.py | ||
| test_nspd_sync.py | ||
| test_ping.py | ||
| test_poi_score.py | ||
| test_quarter_dump_lookup.py | ||
| test_rbac.py | ||
| test_sentry_init.py | ||
| test_velocity.py | ||
| test_weight_profiles.py | ||