blob: d5d3e35a3cf30f390ff81eed166da473dd6ba57c (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
#!/bin/bash
set -e # fail on error
set -u # fail if variable not set in substitution
set -o pipefail # fail if part of a '|' command fails
sudo -u postgres psql sandcrawler < dump_reingest_bulk.sql
cd ../python
sudo -u sandcrawler pipenv run \
./scripts/ingestrequest_row2json.py /srv/sandcrawler/tasks/reingest_bulk_current.rows.json \
> /srv/sandcrawler/tasks/reingest_bulk_current.json
cat /srv/sandcrawler/tasks/reingest_bulk_current.json \
| shuf \
| head -n1000000 \
| jq . -c \
| kafkacat -P -b wbgrp-svc263.us.archive.org -t sandcrawler-prod.ingest-file-requests-bulk -p -1
|