From 0eee34738e40f0799f15d8fc9be06cecec1b19b1 Mon Sep 17 00:00:00 2001 From: nilsnolde Date: Mon, 18 Dec 2023 17:19:07 +0100 Subject: [PATCH] max retry of 7.5 mins over 5 tries --- scripts/valhalla_build_elevation | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/valhalla_build_elevation b/scripts/valhalla_build_elevation index bbdba09cac..53918d0f80 100755 --- a/scripts/valhalla_build_elevation +++ b/scripts/valhalla_build_elevation @@ -246,11 +246,11 @@ def download(tile: Tile, output_dir, compression: TileCompression) -> bool: LOGGER.info(f"Downloading tile {tile.name}") download_status = DownloadStatus.FAILED - for i in range(15): + for i in range(5): try: LOGGER.debug(f"Downloading tile {tile.dir}/{tile.name} for the {i}th time.") - # tries up to 4.3 hours with exponentially increasing sleeps in between + # tries up to 24 mins with exponentially increasing sleeps in between, starting with 5 seconds sleep((i**2) / 2 * 30) with request.urlopen(url) as res, open(filepath, "wb") as f: