redis retry

This commit is contained in:
virusdefender 2018-01-06 14:26:46 +08:00
parent b50f5404ff
commit dbce3e443a

View File

@ -51,13 +51,13 @@ while [ $n -lt 5 ]
do
python manage.py migrate --no-input &&
python manage.py inituser --username=root --password=rootroot --action=create_super_admin &&
echo "from options.options import SysOptions; SysOptions.judge_server_token='$JUDGE_SERVER_TOKEN'" | python manage.py shell &&
break
n=$(($n+1))
echo "Failed to migrate, going to retry..."
sleep 8
done
echo "from options.options import SysOptions; SysOptions.judge_server_token='$JUDGE_SERVER_TOKEN'" | python manage.py shell || exit 1
chown -R nobody:nogroup $DATA $APP/dist
exec supervisord -c /app/deploy/supervisord.conf
exec supervisord -c /app/deploy/supervisord.conf