flush redis after connection established, improve bulk.sh

This commit is contained in:
jomo
2014-11-03 01:11:19 +01:00
parent e35106a03b
commit f71f11aa87
2 changed files with 7 additions and 2 deletions

View File

@@ -1,4 +1,9 @@
#!/bin/bash
host="$1"
if [ -z "$host" ]; then
echo "Usage: $0 <host>"
exit 1
fi
dir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
rm -f "$dir/../skins/"*.png || exit 1
for uuid in `cat "$dir/uuids.txt"`; do
@@ -8,5 +13,5 @@ for uuid in `cat "$dir/uuids.txt"`; do
if [ "$(( ((RANDOM<<15)|RANDOM) % 2 ))" -eq "1" ]; then
helm="&helm"
fi
curl -sS -o /dev/null -w "%{url_effective} %{http_code} %{time_total}s\\n" "http://crafatar.com/avatars/$uuid?size=$size$helm" || exit 1
curl -sSL -o /dev/null -w "%{url_effective} %{http_code} %{time_total}s\\n" "http://$host/avatars/$uuid?size=$size$helm" || exit 1
done