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

refactor(agent): extract oracle component/service #128

Merged
merged 6 commits into from
Jun 28, 2024

Conversation

Reisen
Copy link
Contributor

@Reisen Reisen commented Jun 20, 2024

No description provided.


/// Capacities of the channels top-level components use to communicate
#[derive(Deserialize, Debug)]
pub struct ChannelCapacities {
Copy link
Collaborator

Choose a reason for hiding this comment

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

might be good to mark the deprecated ones.

state.clone(),
publisher_permissions_tx.clone(),
)
.await;
Copy link
Collaborator

Choose a reason for hiding this comment

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

maybe add some logs here?


loop {
select! {
update = notifier.next() => handle_account_update(state.clone(), network, update).await,
Copy link
Collaborator

Choose a reason for hiding this comment

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

how we handle websocket failures here? i don't see any logic to handle it. i think we had it in the past.

};
}
None => {
tracing::debug!("subscriber closed connection");
Copy link
Collaborator

Choose a reason for hiding this comment

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

back to my comment above, we need to reconnect when it happens.

///
/// Behaviour:
/// - Spawns Oracle: (Obsolete, now Extracted to state/oracle.rs)
/// - Spawns a Subscriber:
Copy link
Collaborator

Choose a reason for hiding this comment

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

subscriber is no more

Copy link
Collaborator

@ali-bahjati ali-bahjati left a comment

Choose a reason for hiding this comment

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

Nice! The code is now much simpler!! thanks! I think we want to fix the WS behaviour and CI before merging.

@Reisen Reisen force-pushed the push-mxrwnmunwzxu branch from 98ee33a to 228d4e7 Compare June 27, 2024 12:31
@Reisen Reisen marked this pull request as ready for review June 27, 2024 12:34
@Reisen Reisen force-pushed the push-mxrwnmunwzxu branch from 228d4e7 to 1724443 Compare June 27, 2024 15:55
@ali-bahjati ali-bahjati merged commit 05ef724 into main Jun 28, 2024
2 checks passed
@ali-bahjati ali-bahjati deleted the push-mxrwnmunwzxu branch June 28, 2024 08:42
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