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: improve FailoverProvider #43

Merged
merged 1 commit into from
Jan 7, 2025
Merged

Conversation

jtourkos
Copy link
Contributor

@jtourkos jtourkos commented Dec 17, 2024

Updates the failover provider with the new functionality.

No need to take a look at FailoverJsonRpcProvider.ts. Changes are identical to this PR and already reviewed.

@jtourkos jtourkos requested a review from efstajas December 17, 2024 15:57
Copy link

railway-app bot commented Dec 17, 2024

🚅 Previously deployed to Railway in the Drips App project. Environment has been deleted.

@railway-app railway-app bot temporarily deployed to graphql-api-pr-43 December 17, 2024 15:58 Destroyed
const errors: { rpcEndpoint: string; error: Error }[] = [];

// Try each endpoint, in order.
for (const rpcEndpoint of this._rpcEndpoints) {

Choose a reason for hiding this comment

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

I see you're needing the index later. How about something like:

Suggested change
for (const rpcEndpoint of this._rpcEndpoints) {
for (const [currentIndex, rpcEndpoint] of this._rpcEndpoints.entries()) {

@jtourkos jtourkos merged commit ef80b44 into main Jan 7, 2025
1 check failed
@railway-app railway-app bot requested a deployment to app-pr-1406 January 7, 2025 08:56 Abandoned
@railway-app railway-app bot requested a deployment to app-pr-1381 January 7, 2025 08:56 Abandoned
@jtourkos jtourkos deleted the improved-failover-provider branch January 7, 2025 08:57
@railway-app railway-app bot requested a deployment to search-sync-pr-2 January 8, 2025 11:27 Abandoned
@railway-app railway-app bot requested a deployment to app-pr-1415 January 9, 2025 13:30 Abandoned
@railway-app railway-app bot requested a deployment to sprinkler-pr-9 January 10, 2025 11:29 Abandoned
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.

3 participants