From a33d55829460c0225f0295e60509d08f6f6f00b5 Mon Sep 17 00:00:00 2001 From: wiz Date: Tue, 29 Mar 2022 11:34:49 -0500 Subject: [PATCH] Fix nginx cache warmer script for url slugs --- production/nginx-cache-warmer | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/production/nginx-cache-warmer b/production/nginx-cache-warmer index a8fde4511..7aa055778 100755 --- a/production/nginx-cache-warmer +++ b/production/nginx-cache-warmer @@ -1,5 +1,7 @@ #!/usr/bin/env zsh hostname=$(hostname) +slugs=(`curl -sSL https://raw.githubusercontent.com/mempool/mining-pools/master/pools.json | jq -r '.slugs[]'`) + while true do for url in / \ '/api/v1/statistics/2h' \ @@ -39,7 +41,6 @@ do for url in / \ curl -s "https://${hostname}${url}" >/dev/null done - slugs=$(cat pools.json | jq -r .slugs[]) for slug in $slugs do curl -s "https://${hostname}/api/v1/mining/pool/${slug}/hashrate" >/dev/null