1
0
Fork 0
mirror of https://github.com/mempool/mempool.git synced 2025-03-13 03:24:28 +01:00
mempool/production/nginx-cache-heater

24 lines
330 B
Bash
Executable file

#!/usr/bin/env zsh
hostname=$(hostname)
heat()
{
echo "$1"
curl -i -s "$1" | head -1
}
heatURLs=(
'/api/v1/fees/recommended'
)
while true
do
echo "starting heat cache cycle..."
for url in $heatURLs
do
heat "https://${hostname}${url}"
done
sleep 0.5
done