Repository navigation
retry failed elevation tile download - #4461
Merged
Merged
Conversation
…or the downloaded tile was corrupt
nilsnolde
commented
Dec 15, 2023
| except URLError as e: | ||
| LOGGER.critical(f"Download failed of elevation tile {tile.dir}/{tile.name}: {e.reason}") | ||
|
|
||
| download_status = DownloadStatus.FAILED |
Member
Author
There was a problem hiding this comment.
most of the diff is just wrapping the previous logic into a for loop, where we request 15 times maximum with increased sleeps in between (exponential back off), up to 4.5 hours until we give up. could give much earlier though :D
nilsnolde
commented
Dec 15, 2023
Comment on lines
+260
to
+262
| try: | ||
| uncompressed = gz.read() | ||
| except Exception as e: |
Member
Author
There was a problem hiding this comment.
protect for corrupt downloads
nilsnolde
commented
Dec 15, 2023
Comment on lines
+301
to
+303
| if download_status == DownloadStatus.CORRUPTED: | ||
| LOGGER.error(f"Tile {tile.dir}/{tile.name} was corrupted, removing it...") | ||
| filepath.unlink() |
Member
Author
There was a problem hiding this comment.
if it was corrupted in the end, let's remove that tile from the file system
nilsnolde
requested review from
chrstnbwnkl,
dnesbitt61,
gknisely and
kevinkreiser
December 16, 2023 10:28
kevinkreiser
previously approved these changes
Dec 18, 2023
kevinkreiser
left a comment
Member
There was a problem hiding this comment.
maybe use 4 or something instead of 15 tries
Member
Author
|
changed it to 5 retries, totalling 7.5 mins in worst case. |
kevinkreiser
approved these changes
Dec 18, 2023
Member
Author
|
not gonna merge master again with the admin changes |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
fixes #4425