-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathdaily_loads
More file actions
executable file
·36 lines (31 loc) · 2.24 KB
/
daily_loads
File metadata and controls
executable file
·36 lines (31 loc) · 2.24 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
#!/bin/sh
cd "$(dirname "$0")"
# These cascade download/transform nicely and give a 20 minute buffer for the simultaneous instance load
$(uv python find) ./circ_audit.py > ../logs/`date "+%Y%m%d-%H%M"`.circ_audit.log 2>&1 &
$(uv python find) ./circ_logs.py > ../logs/`date "+%Y%m%d-%H%M"`.circ_logs.log 2>&1 &
$(uv python find) ./circ_checkin.py > ../logs/`date "+%Y%m%d-%H%M"`.circ_checkin.log 2>&1 &
wait # for the circ to finish up
$(uv python find) ./instance_load_id.py > ../logs/`date "+%Y%m%d-%H%M"`.instance_id.log 2>&1 &
# These will run while the instances are downloading
$(uv python find) ./circ_load.py > ../logs/`date "+%Y%m%d-%H%M"`.circ.log 2>&1
$(uv python find) ./user_load.py > ../logs/`date "+%Y%m%d-%H%M"`.user.log 2>&1
$(uv python find) ./inv_plus_load.py > ../logs/`date "+%Y%m%d-%H%M"`.inv_plus.log 2>&1
$(uv python find) ./courses_load.py > ../logs/`date "+%Y%m%d-%H%M"`.courses.log 2>&1
$(uv python find) ./fines_f_load.py > ../logs/`date "+%Y%m%d-%H%M"`.fines_f.log 2>&1
$(uv python find) ./finance_load.py > ../logs/`date "+%Y%m%d-%H%M"`.finance.log 2>&1
$(uv python find) ./orders_load.py > ../logs/`date "+%Y%m%d-%H%M"`.orders.log 2>&1
$(uv python find) ./org_load.py > ../logs/`date "+%Y%m%d-%H%M"`.org.log 2>&1
$(uv python find) ./permissions_load.py > ../logs/`date "+%Y%m%d-%H%M"`.perms.log 2>&1
$(uv python find) ./inventory_load.py > ../logs/`date "+%Y%m%d-%H%M"`.inventory.log 2>&1
$(uv python find) ./agree_load.py > ../logs/`date "+%Y%m%d-%H%M"`.agree.log 2>&1
wait # for the instances to finish transforming
sleep 600 # Let autovaccuumming catch up
# Run holdings while downloading items
$(uv python find) ./holdings_load_id.py > ../logs/`date "+%Y%m%d-%H%M"`.holdings_id.log 2>&1 &
sleep 900 # holdings take about 15 minutes longer to download + transform than items takes to download
# Run items while downloading marc
$(uv python find) ./items_load_id.py > ../logs/`date "+%Y%m%d-%H%M"`.items_id.log 2>&1 &
sleep 1800 # items and holdings take about 30 minutes longer to download + transform than marc takes to download
./prepare_src > ../logs/`date "+%Y%m%d-%H%M"`.src_retries.log 2>&1
ldpmarc -D /mnt/volume_nyc3_01/ldpmarc -f -v -u folio_read -M > ../logs/`date "+%Y%m%d-%H%M"`.ldpmarc.log 2>&1
wait # for items and holdings (just in case)