Retry Garmin stat downloads on transient failures#308
Open
deewhyarc-glitch wants to merge 1 commit intotcgoetz:masterfrom
Open
Retry Garmin stat downloads on transient failures#308deewhyarc-glitch wants to merge 1 commit intotcgoetz:masterfrom
deewhyarc-glitch wants to merge 1 commit intotcgoetz:masterfrom
Conversation
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.
Summary
This change retries daily Garmin stat downloads when transient API failures occur.
In particular, HRV downloads can fail intermittently for specific dates. Before this change, those failures were logged and then skipped, which could leave gaps in downloaded data. With this patch, stat downloads retry up to 5 times with a short backoff before giving up.
Changes
Download.__get_stat__get_hrv_dayre-raise fetch failures so they participate in the retry loopWhy
I hit intermittent HRV download failures on specific dates. Retrying the stat fetch resolves transient failures without requiring manual reruns and makes the HRV import path more robust.
Testing
Ran: