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
_check2.sh Normal file
View File

@@ -0,0 +1,26 @@
#!/bin/bash
echo "=========================================="
echo "== ТЕКУЩАЯ АКТИВНОСТЬ SYNC (последние логи) =="
echo "=========================================="
docker logs iaai-worker --tail 30 2>&1 | grep -E "Segment|HTTP-mode page|upserted|finished|ERROR" | tail -20
echo ""
echo "=========================================="
echo "== DB: всего машин и апсерты за 5 минут =="
echo "=========================================="
docker exec iaai-postgres psql -U iaai -d iaai_scraper -t -c "select 'total=' || count(*), 'last_5min=' || count(*) filter (where last_seen_at > now() - interval '5 minutes'), 'last_1min=' || count(*) filter (where last_seen_at > now() - interval '1 minute') from cars;"
echo ""
echo "=========================================="
echo "== Макс timestamp (когда была последняя запись) =="
echo "=========================================="
docker exec iaai-postgres psql -U iaai -d iaai_scraper -t -c "select 'max_last_seen=' || max(last_seen_at), 'now=' || now() from cars;"
echo ""
echo "=========================================="
echo "== Топ марок в БД =="
echo "=========================================="
docker exec iaai-postgres psql -U iaai -d iaai_scraper -t -c "select make, count(*) from cars group by make order by count(*) desc limit 10;"
echo ""
echo "=========================================="
echo "== Очередь Celery =="
echo "=========================================="
docker exec iaai-redis redis-cli llen scraping
echo "lock TTL: $(docker exec iaai-redis redis-cli ttl iaai:locks:sync_listing)s"