#!/bin/bash
# From
objtype=extid
PARTITIONS=16
PARAMS="--dry-run"
mkdir -p logs/$objtype
for i in `seq 0 $PARTITIONS`; do
CMD=$(python3 backfill_command.py $PARTITIONS $i)
if [ -z "$CMD" ]; then
continue
fi
CMD="${CMD} ${PARAMS}"
echo "Starting ${objtype} $CMD"
echo " $CMD"
SWH_CONFIG_FILENAME=/etc/softwareheritage/journal/backfill.yml $CMD 1>&1 | tee -a >(gzip -c > logs/$objtype/$prefix.log.gz) &
done
wait