Use slugs in cache warmer

This commit is contained in:
nymkappa committed 2022-03-30 01:06:42 +09:00
1 parent 0965140bd5
commit 1088655b1f
1 file changed
+4 -5
+4 -5
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