-
Notifications
You must be signed in to change notification settings - Fork 302
feat(apps/benchmarks_keeper): init benchmarks_keeper #2047
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
Conversation
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
1 Skipped Deployment
|
apps/benchmarks_keeper/src/lib.rs
Outdated
|
|
||
| // Process PriceUpdate events | ||
| let mut stream = sub.into_stream(); | ||
| while let Some(log) = stream.next().await { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should probably have a reconnect on the error and a liveness check in case the streams gets stuck without producing new data.
apps/benchmarks_keeper/src/lib.rs
Outdated
|
|
||
| // Subscribe to PriceUpdate events | ||
| let filter = PriceUpdate::filter().address(config.contract_address); | ||
| let sub = provider.subscribe_logs(&filter).await?; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does it only fetch new events? How do you plan to deal with events that were missed while the service was not running? I was thinking that maybe we should query old events (up to a certain age) and try to process them as well.
|
|
||
| #[derive(Debug, Serialize)] | ||
| pub struct PriceUpdateResults { | ||
| pub results: HashMap<String, PriceUpdateResult>, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"Result" name can be misleading in Rust context. I'd prefer something like PriceFeedValue or PriceFeedInfo.
e7d5843 to
950eb2e
Compare
950eb2e to
7bf5373
Compare
No description provided.