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

endpoint health #152

Merged
merged 22 commits into from
Apr 8, 2024
Merged

endpoint health #152

merged 22 commits into from
Apr 8, 2024

Conversation

ermalkaleci
Copy link
Collaborator

No description provided.

@ermalkaleci ermalkaleci marked this pull request as ready for review April 2, 2024 19:02
@ermalkaleci ermalkaleci requested a review from xlc April 2, 2024 19:02
src/extensions/client/endpoint.rs Outdated Show resolved Hide resolved
src/extensions/client/endpoint.rs Outdated Show resolved Hide resolved
Ok(client) => {
let client = Arc::new(client);
health_.update(Event::ConnectionSuccessful);
_ = client_tx.send(Some(client.clone()));
Copy link
Member

Choose a reason for hiding this comment

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

log errror?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

this is success case. error is below

Copy link
Member

Choose a reason for hiding this comment

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

I mean something like this

Suggested change
_ = client_tx.send(Some(client.clone()));
if let Err(e) = client_tx.send(Some(client.clone())) {
tracing::error!("Unexpected error: {e}");
}

src/extensions/client/health.rs Outdated Show resolved Hide resolved
src/extensions/client/health.rs Show resolved Hide resolved
src/extensions/client/health.rs Show resolved Hide resolved
src/extensions/client/health.rs Outdated Show resolved Hide resolved
Ok(client) => {
let client = Arc::new(client);
health_.update(Event::ConnectionSuccessful);
_ = client_tx.send(Some(client.clone()));
Copy link
Member

Choose a reason for hiding this comment

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

I mean something like this

Suggested change
_ = client_tx.send(Some(client.clone()));
if let Err(e) = client_tx.send(Some(client.clone())) {
tracing::error!("Unexpected error: {e}");
}

@ermalkaleci ermalkaleci merged commit cdbdd9b into master Apr 8, 2024
1 check passed
@ermalkaleci ermalkaleci deleted the endpoint-score branch April 8, 2024 07:43
kostekIV added a commit to Cardinal-Cryptography/subway that referenced this pull request Apr 29, 2024
* subsquid indexer & processor fix (AcalaNetwork#150)

* update deps (AcalaNetwork#155)

* bypass cache for unfinalized blocks (AcalaNetwork#154)

* endpoint health (AcalaNetwork#152)

* Await healthy endpoint (AcalaNetwork#158)

* use only tracing (AcalaNetwork#157)

* Filter call errors (AcalaNetwork#159)

* validate middleware (AcalaNetwork#156)

* validate middleware

* validate extension for config

* rename

* Improve env handling via preprocessing templated config files (AcalaNetwork#162)

* Feat(config): support ${var:-word} and ${var:+word} syntax (AcalaNetwork#164)

* fix cli default value (AcalaNetwork#169)

* improve reconnect wait time (AcalaNetwork#168)
---------

Co-authored-by: mrq1911 <lumir.mrkva@topmonks.com>
Co-authored-by: Ermal Kaleci <ermalkaleci@gmail.com>
Co-authored-by: Jiyuan Zheng <indirection42@outlook.com>
xlc added a commit that referenced this pull request May 18, 2024
xlc added a commit that referenced this pull request May 18, 2024
* Revert "Refactor endpoint (#178)"

This reverts commit 7fa3132.

* Revert "ensure we reconnect on failure (#173)"

This reverts commit 5039cfa.

* Revert "improve reconnect wait time (#168)"

This reverts commit 7cb7c73.

* Revert "Await healthy endpoint (#158)"

This reverts commit ef1c524.

* Revert "endpoint health (#152)"

This reverts commit cdbdd9b.

* redo validate middleware

* fix
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