Fix update cache script

This commit is contained in:
pietervdvn 2021-07-18 18:29:15 +02:00
parent 1d01238973
commit c6a4ad45e1
2 changed files with 4 additions and 2 deletions

View file

@ -56,7 +56,8 @@ export default class ScriptUtils {
const urlObj = new URL(url) const urlObj = new URL(url)
https.get({ https.get({
host: urlObj.host, host: urlObj.host,
path: urlObj.pathname, path: urlObj.pathname + urlObj.search,
port: urlObj.port, port: urlObj.port,
headers: { headers: {
"accept": "application/json" "accept": "application/json"

View file

@ -93,7 +93,8 @@ async function downloadRaw(targetdir: string, r: TileRange, overpass: Overpass)/
} }
) )
.catch(err => { .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++; failed++;
return ScriptUtils.sleep(60000).then(() => console.log("Waiting is done")) return ScriptUtils.sleep(60000).then(() => console.log("Waiting is done"))
}) })