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

chore(pricing): cleanup pricing duplication #60

Merged
merged 10 commits into from
Dec 16, 2023

Conversation

charliedmcb
Copy link
Collaborator

@charliedmcb charliedmcb commented Dec 13, 2023

Fixes #

Description
In the pricing provider it was fetching from the pricing API twice (once for spot, and another for on-demand)

Refactored the logic to only fetch once.

Note: the locking feels a little messy as during the price update we grab the lock around the fetch, release it, and then grab it again when updating the prices. However, I don't see this actually causing issues. I think this could still be cleaned up in another PR, but think it'd add a little more refactoring I want to leave out of this one.

How was this change tested?
Nothing additional
*

Does this change impact docs?

  • Yes, PR includes docs updates
  • Yes, issue opened: #
  • No

Release Note

NONE

Copy link
Collaborator Author

@charliedmcb charliedmcb left a comment

Choose a reason for hiding this comment

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

/test

Copy link
Collaborator Author

@charliedmcb charliedmcb left a comment

Choose a reason for hiding this comment

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

/test

Copy link
Collaborator Author

@charliedmcb charliedmcb left a comment

Choose a reason for hiding this comment

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

/test

@charliedmcb charliedmcb marked this pull request as ready for review December 13, 2023 22:20
Copy link
Collaborator Author

@charliedmcb charliedmcb left a comment

Choose a reason for hiding this comment

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

/test

Copy link
Collaborator Author

@charliedmcb charliedmcb left a comment

Choose a reason for hiding this comment

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

/test

Copy link
Collaborator Author

@charliedmcb charliedmcb left a comment

Choose a reason for hiding this comment

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

/test

Copy link
Collaborator Author

@charliedmcb charliedmcb left a comment

Choose a reason for hiding this comment

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

/test

@tallaxes tallaxes merged commit 80c6298 into main Dec 16, 2023
13 of 14 checks passed
@tallaxes tallaxes deleted the charliedmcb/cleanUpPricingDuplication branch December 16, 2023 00:01
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.

2 participants