Skip to content

Commit

Permalink
Restart by monit only if last logs show no success
Browse files Browse the repository at this point in the history
Complements a3eabd5.
  • Loading branch information
dr0i committed Nov 16, 2023
1 parent a9ed8fb commit d0c0005
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions web/monit_restart.sh
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@ case $ACTION in
rm target/universal/stage/RUNNING_PID
fi
JAVA_OPTS="$JAVA_OPTS -XX:+ExitOnOutOfMemoryError -XX:+HeapDumpOnOutOfMemoryError -DpreferIPv4Stack" sbt clean "start $PORT" & > monit_start.log
if [ -n $DO_ETL_UPDATE ]; then
echo "Sleep 100s before starting ETL ..." >> monit_start.log
if [ -n $DO_ETL_UPDATE -a $(tail -n100 web/logs/etl.log |grep -c "Finishing indexing of ES index 'resources-alma-fix'") -gt 0 ]; then
echo "Automatical updates-ETL triggered and last entries were not ok, thus starting ETL. Sleep 100s before starting ETL ..." >> monit_start.log
sleep 100
curl http://localhost:$PORT/resources/webhook/update-alma?token=$ETL_TOKEN
fi
Expand Down

0 comments on commit d0c0005

Please sign in to comment.