Worker startup script.

This commit is contained in:
Mark Smith 2019-12-11 19:42:16 -08:00
parent c2f14083ac
commit cd237dbe20
1 changed files with 6 additions and 1 deletions

View File

@ -9,4 +9,9 @@ perl -I$LJHOME/extlib/ $LJHOME/bin/checkconfig.pl || sleep infinity
# Run whatever was passed as an argument.
COMMAND="$1"
shift
exec $LJHOME/$COMMAND "$@"
while true; do
# If the worker exits successfully, run it again -- it was probably just done
# running jobs and freeing up memory. Any other condition, propogate.
$LJHOME/$COMMAND "$@" || exit $?
done