feat: introduce routing status tracking for approved roads and telemetry batch queue limits

This commit is contained in:
Hamza-Ayed
2026-09-19 12:34:26 +03:00
parent a8470eb76c
commit 91e9e71ce4
9 changed files with 234 additions and 129 deletions
+5 -8
View File
@@ -68,15 +68,12 @@ docker compose --profile import run --rm osm-import \
--database mapdb --host db --user mapuser \
/data/iraq-latest.osm.pbf
# ── Step 2b: إسقاط جداول osm2pgsql الوسيطة ────────────────────────────────
# planet_osm_nodes/ways/rels ينشئها --slim لدعم --append فقط، ولا يقرأها
# التطبيق ولا martin إطلاقاً (جداول الإخراج هي line/polygon/point/roads).
# قياس 30/07/2026: nodes 5031MB + ways 1400MB ≈ 6.4GB نائمة بين الدورات.
# آمن لأن --create في الخطوة 2 يعيد إنشاءها من الصفر كل تشغيل.
# ⚠️ لا تشغّل osm2pgsql --append بعد هذه النقطة حتى الدورة القادمة.
echo "🧹 إسقاط جداول osm2pgsql الوسيطة (تُعاد في الدورة القادمة)..."
# ── Step 2b: Keep routing topology tables ─────────────────────────────────
# Approved roads must share real OSM node IDs with the base graph. Deleting
# nodes/ways makes Martin draw a road but leaves GraphHopper unable to connect it.
echo "🧭 Preserving OSM node/way topology for approved-road routing..."
docker compose exec -T db psql -U mapuser -d mapdb -c \
"DROP TABLE IF EXISTS planet_osm_nodes, planet_osm_ways, planet_osm_rels;"
"DROP TABLE IF EXISTS planet_osm_rels;"
# ── Step 3: Merge all four PBFs into master_map.osm.pbf ────────────────────
# ✅ FIX: Old script wrote to region.osm.pbf — GraphHopper reads master_map.osm.pbf