mirror of
https://github.com/mempool/mempool.git
synced 2025-03-15 04:11:48 +01:00
Fix nginx cache warmer script for url slugs
This commit is contained in:
parent
0561a207d9
commit
a33d558294
1 changed files with 2 additions and 1 deletions
|
@ -1,5 +1,7 @@
|
||||||
#!/usr/bin/env zsh
|
#!/usr/bin/env zsh
|
||||||
hostname=$(hostname)
|
hostname=$(hostname)
|
||||||
|
slugs=(`curl -sSL https://raw.githubusercontent.com/mempool/mining-pools/master/pools.json | jq -r '.slugs[]'`)
|
||||||
|
|
||||||
while true
|
while true
|
||||||
do for url in / \
|
do for url in / \
|
||||||
'/api/v1/statistics/2h' \
|
'/api/v1/statistics/2h' \
|
||||||
|
@ -39,7 +41,6 @@ do for url in / \
|
||||||
curl -s "https://${hostname}${url}" >/dev/null
|
curl -s "https://${hostname}${url}" >/dev/null
|
||||||
done
|
done
|
||||||
|
|
||||||
slugs=$(cat pools.json | jq -r .slugs[])
|
|
||||||
for slug in $slugs
|
for slug in $slugs
|
||||||
do
|
do
|
||||||
curl -s "https://${hostname}/api/v1/mining/pool/${slug}/hashrate" >/dev/null
|
curl -s "https://${hostname}/api/v1/mining/pool/${slug}/hashrate" >/dev/null
|
||||||
|
|
Loading…
Add table
Reference in a new issue