Skip to content

Commit

Permalink
Don't index if data is empty (#350)
Browse files Browse the repository at this point in the history
  • Loading branch information
dr0i committed Nov 10, 2023
1 parent cdc3480 commit e7ccb82
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions cron.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,14 @@ set -uo pipefail # See http://redsymbol.net/articles/unofficial-bash-strict-mode
IFS=$'\n\t'
RECIPIENT=lobid-admin
sbt -mem 4000 "runMain apps.ConvertUpdates $(tail -n1 GND-lastSuccessfulUpdate.txt)"
sbt -Dindex.prod.name=gnd-test "runMain apps.Index updates"
bash ./checkCompactedProperties.sh gnd-test

# if check ok, index to productive instance:
if [ $? -eq 0 ]; then
sbt -Dindex.prod.name=gnd "runMain apps.Index updates"
bash ./checkCompactedProperties.sh gnd
if [ -s GND-updates.jsonl ]; then
sbt -Dindex.prod.name=gnd-test "runMain apps.Index updates"
bash ./checkCompactedProperties.sh gnd-test

# if check ok, index to productive instance:
if [ $? -eq 0 ]; then
sbt -Dindex.prod.name=gnd "runMain apps.Index updates"
bash ./checkCompactedProperties.sh gnd
fi
fi

0 comments on commit e7ccb82

Please sign in to comment.