checkpoint: pipeline + 27k/h baseline before sitemap discovery

This commit is contained in:
qananasikq
2026-04-18 16:34:09 +03:00
parent a8c5f8aa41
commit 5999c2e42d
30 changed files with 4993 additions and 61 deletions

26
_db_now.sh Normal file
View File

@@ -0,0 +1,26 @@
#!/usr/bin/env bash
set -euo pipefail
cd /root/iaai_scraper_project
echo "== DB now =="
docker compose exec -T postgres psql -U iaai -d iaai_scraper -c "
SELECT
count(*) AS total,
count(*) FILTER (WHERE last_seen_at > now() - interval '1 minute') AS last_1min,
count(*) FILTER (WHERE last_seen_at > now() - interval '5 minutes') AS last_5min,
count(*) FILTER (WHERE last_seen_at > now() - interval '15 minutes') AS last_15min,
max(last_seen_at) AS max_ts,
now() AS now_ts
FROM cars;"
echo
echo "== last 10 upsert / segment-done events =="
docker compose logs --tail=1000 worker 2>&1 | grep -E 'upserted=|Segment .* done|HTTP-mode batch' | tail -n 15
echo
echo "== last 5 page-progress =="
docker compose logs --tail=200 worker 2>&1 | grep -E 'HTTP-mode page' | tail -n 5
echo
echo "== recent 500s (if any) =="
docker compose logs --tail=500 worker 2>&1 | grep -E 'status=500|status=403' | tail -n 5 || true