Only update SQL caches on Mondays

This commit is contained in:
Yorhel 2019-05-09 13:11:15 +02:00
parent e926f89838
commit fbd7b71d73

View file

@ -9,5 +9,9 @@ PSQL="psql -U manned -Awtq"
./fedora.sh current
./ubuntu.sh current
echo "============ Updating SQL indices"
$PSQL -f update_indices.sql
# Only update indices once a week (on mondays). This process is slow and the data doesn't often change anyway.
if [ `date +%u` == 1 ]
then
echo "============ Updating SQL indices"
$PSQL -f update_indices.sql
fi