Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix dexcom task retry logic #675

Closed
wants to merge 1 commit into from
Closed

fix dexcom task retry logic #675

wants to merge 1 commit into from

Conversation

jh-bate
Copy link
Contributor

@jh-bate jh-bate commented Oct 25, 2023

No description provided.

@jh-bate jh-bate requested a review from tjotala October 25, 2023 00:12
}
count, ok := t.Data[dexcomTaskRetryField].(int)
if ok {
return count >= 3
}
return true
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we reset it to 0 in case it fails to parse? That way it would automatically recover from (what appears to be) bad data in the DB.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A few thoughts:

  • Consider logging this failure as an error so we can detect if/when it happens.
  • Is there a non-linear fallback, just in case there is a bug in the code and this happens repeatedly?
  • You might consider shortening this code to eliminate the extra parse by returning immediately after setting the field to 0.

@jh-bate
Copy link
Contributor Author

jh-bate commented Sep 16, 2024

super seeded by later work

@jh-bate jh-bate closed this Sep 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants