forked from MapComplete/MapComplete
		
	Fix update cache script
This commit is contained in:
		
							parent
							
								
									1d01238973
								
							
						
					
					
						commit
						c6a4ad45e1
					
				
					 2 changed files with 4 additions and 2 deletions
				
			
		|  | @ -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" | ||||
|  |  | |||
|  | @ -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")) | ||||
|                 }) | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue