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

price-reporter: Make misc reliability improvements #42

Merged
merged 1 commit into from
Sep 4, 2024

Conversation

joeykraut
Copy link
Member

Purpose

This PR makes a few changes to the price reporter:

  • Changes the underlying synchronization primitive to a Watch which 1. streams immediately, and 2. more directly captures the semantics of the price reporter.
  • Using a watch means that a websocket and http request both instantly get a price
  • Initialize default pair streams on startup
  • Do not remove a stream once clients disconnect

Testing

  • Tested all websocket pairs, verified that they began streaming instantly

@joeykraut joeykraut marked this pull request as ready for review September 4, 2024 01:12
price-reporter/src/main.rs Outdated Show resolved Hide resolved
price-reporter/src/main.rs Outdated Show resolved Hide resolved
@joeykraut joeykraut merged commit d1cc4ab into main Sep 4, 2024
2 of 3 checks passed
@joeykraut joeykraut deleted the joey/fix-price-reporter branch September 4, 2024 02:07
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