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

Refresh Provider data every week #231

Closed
wants to merge 1 commit into from
Closed

Conversation

mbolt35
Copy link
Collaborator

@mbolt35 mbolt35 commented Nov 7, 2019

This is somewhat over architected for what I ended up with, but due to some inconsistencies with lack of etags on GCP responses, I've punted for now and just added this directly to the run loop.

  • Does it make sense to add a private reference to Accesses so we can call Reset() if the data is force reloaded?
  • Should we expose a configuration value?

@@ -920,7 +920,23 @@ func (a *Accesses) recordPrices() {
return strings.Split(key, ",")
}

// Create job to refresh provider prices every week
// TODO: Make configurable?
refreshProviderCosts := NewTimedJob(7*24*time.Hour, func() error {
Copy link
Collaborator

Choose a reason for hiding this comment

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

So if this fails, retry currently happens in a week? Seems fine for an initial implementation but just wanted to ask

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Yeah - it just doesn't feel like something we want to retry. I'm not sure what type of "failure" can happen outside of failing to download the sku list.

@mbolt35 mbolt35 closed this Dec 3, 2019
@mbolt35 mbolt35 deleted the Bolt-refresh-provider branch December 3, 2019 18:06
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.

None yet

2 participants