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 timeouts #98

Merged
merged 5 commits into from
Nov 17, 2023
Merged

Refactor timeouts #98

merged 5 commits into from
Nov 17, 2023

Conversation

vponline
Copy link
Contributor

Closes #91

@vponline vponline requested review from Siegrift and aquarat November 15, 2023 14:45
Copy link
Collaborator

@aquarat aquarat left a comment

Choose a reason for hiding this comment

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

LGTM 🔥

src/signed-api-fetch/data-fetcher.ts Show resolved Hide resolved
src/signed-api-fetch/data-fetcher.ts Outdated Show resolved Hide resolved
Copy link
Collaborator

@Siegrift Siegrift left a comment

Choose a reason for hiding this comment

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

The timeout logic in runUpdateFeeds needs to change imo.

src/constants.ts Outdated Show resolved Hide resolved
src/signed-api-fetch/data-fetcher.ts Show resolved Hide resolved
src/update-feeds/update-transactions.ts Show resolved Hide resolved
src/update-feeds/update-feeds.ts Outdated Show resolved Hide resolved
);
if (!goFirstBatch.success) {
logger.error(`Failed to get first active dAPIs batch`, goFirstBatch.error);
return;
}
if (Date.now() >= firstBatchStartTime + dataFeedUpdateIntervalMs) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

It's still not bulletproof, but I am not sure we can actually implement this in a bulletproof way.

Copy link
Collaborator

@Siegrift Siegrift left a comment

Choose a reason for hiding this comment

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

👍 LGTM

@vponline vponline merged commit b2d99fc into main Nov 17, 2023
@vponline vponline deleted the timeouts branch November 17, 2023 05:47
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.

Handle timeouts and properly cleanup memory
3 participants