ops: Only warm cache testnet URLs 10% of the time

This commit is contained in:
wiz 2026-07-14 22:58:59 +09:00
parent 5b633d8f4d
commit c57d1cd959
No known key found for this signature in database
GPG key ID: A394E332255A6173

View file

@ -172,16 +172,22 @@ do
for url in $warmMiningURLs
do
warm "http://${hostnameBitcoin}${url}"
warm "http://${hostnameBitcoin}/testnet${url}"
warm "http://${hostnameBitcoin}/testnet4${url}"
warm "http://${hostnameBitcoin}/signet${url}"
# only warm cache for testnet URLs 10% of the time
if (( RANDOM % 100 < 10 )); then
warm "http://${hostnameBitcoin}/testnet${url}"
warm "http://${hostnameBitcoin}/testnet4${url}"
warm "http://${hostnameBitcoin}/signet${url}"
fi
done
for url in $warmLightningURLs
do
warm "http://${hostnameBitcoin}${url}"
warm "http://${hostnameBitcoin}/testnet${url}"
warm "http://${hostnameBitcoin}/signet${url}"
# only warm cache for testnet URLs 10% of the time
if (( RANDOM % 100 < 10 )); then
warm "http://${hostnameBitcoin}/testnet${url}"
warm "http://${hostnameBitcoin}/signet${url}"
fi
done
for url in $warmLiquidURLs