From c6a4ad45e139ef9ba22c85019de0b8828e14094d Mon Sep 17 00:00:00 2001 From: pietervdvn Date: Sun, 18 Jul 2021 18:29:15 +0200 Subject: [PATCH] Fix update cache script --- scripts/ScriptUtils.ts | 3 ++- scripts/generateCache.ts | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/scripts/ScriptUtils.ts b/scripts/ScriptUtils.ts index ccf230275..facf7f934 100644 --- a/scripts/ScriptUtils.ts +++ b/scripts/ScriptUtils.ts @@ -56,7 +56,8 @@ export default class ScriptUtils { const urlObj = new URL(url) https.get({ host: urlObj.host, - path: urlObj.pathname, + path: urlObj.pathname + urlObj.search, + port: urlObj.port, headers: { "accept": "application/json" diff --git a/scripts/generateCache.ts b/scripts/generateCache.ts index 77dfa8653..b106ff05f 100644 --- a/scripts/generateCache.ts +++ b/scripts/generateCache.ts @@ -93,7 +93,8 @@ async function downloadRaw(targetdir: string, r: TileRange, overpass: Overpass)/ } ) .catch(err => { - console.log("Could not download - probably hit the rate limit; waiting a bit") + console.log(url) + console.log("Could not download - probably hit the rate limit; waiting a bit. ("+err+")") failed++; return ScriptUtils.sleep(60000).then(() => console.log("Waiting is done")) })