load_aac.sh
1 #!/bin/bash 2 3 set -Eeuxo pipefail 4 5 # Run this script by running: docker exec -it aa-data-import--web /scripts/load_aac.sh 6 # Feel free to comment out steps in order to retry failed parts of this script, when necessary. 7 # Load scripts are idempotent, and can be rerun without losing too much work. 8 9 cd /temp-dir/aac 10 11 PYTHONIOENCODING=UTF8:ignore python3 /scripts/helpers/load_aac.py /temp-dir/aac/annas_archive_meta__aacid__zlib3_records* & 12 job1pid=$! 13 PYTHONIOENCODING=UTF8:ignore python3 /scripts/helpers/load_aac.py /temp-dir/aac/annas_archive_meta__aacid__zlib3_files* & 14 job2pid=$! 15 PYTHONIOENCODING=UTF8:ignore python3 /scripts/helpers/load_aac.py /temp-dir/aac/annas_archive_meta__aacid__ia2_records* & 16 job3pid=$! 17 PYTHONIOENCODING=UTF8:ignore python3 /scripts/helpers/load_aac.py /temp-dir/aac/annas_archive_meta__aacid__ia2_acsmpdf_files* & 18 job4pid=$! 19 PYTHONIOENCODING=UTF8:ignore python3 /scripts/helpers/load_aac.py /temp-dir/aac/annas_archive_meta__aacid__duxiu_records* & 20 job5pid=$! 21 22 wait $job1pid 23 wait $job2pid 24 wait $job3pid 25 wait $job4pid 26 wait $job5pid