From dbce3e443a71c4f29947b1f9a3ef9f0a91e4e0a8 Mon Sep 17 00:00:00 2001 From: virusdefender Date: Sat, 6 Jan 2018 14:26:46 +0800 Subject: [PATCH] redis retry --- deploy/entrypoint.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/deploy/entrypoint.sh b/deploy/entrypoint.sh index 97d6c625..929e9c0b 100755 --- a/deploy/entrypoint.sh +++ b/deploy/entrypoint.sh @@ -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 \ No newline at end of file +exec supervisord -c /app/deploy/supervisord.conf