Use slugs in cache warmer

This commit is contained in:
nymkappa 2022-03-30 01:06:42 +09:00
parent 0965140bd5
commit 1088655b1f
No known key found for this signature in database
GPG Key ID: E155910B16E8BD04

View File

@ -39,12 +39,11 @@ do for url in / \
curl -s "https://${hostname}${url}" >/dev/null
done
counter=1
while [ $counter -le 134 ]
slugs=$(cat pools.json | jq -r .slugs[])
for slug in $slugs
do
curl -s "https://${hostname}/api/v1/mining/pool/${counter}/hashrate" >/dev/null
curl -s "https://${hostname}/api/v1/mining/pool/${counter}" >/dev/null
((counter++))
curl -s "https://${hostname}/api/v1/mining/pool/${slug}/hashrate" >/dev/null
curl -s "https://${hostname}/api/v1/mining/pool/${slug}" >/dev/null
done
sleep 10