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

DPLT-1066 feat: add fallback to old feed #148

Merged
merged 2 commits into from
Jul 26, 2023

Conversation

roshaans
Copy link
Contributor

@roshaans roshaans commented Jul 25, 2023

If the lag between QueryAPI feed and NearSocial feed is more than 2 block heights, we fallback to the old feed widget

You can view the changes here: https://www.near.org/dev-queryapi.dataplatform.near/widget/QueryApi.dev.Feed

You can click fork and then mess with the QueryAPI link or the lag parameter to test the logic.

@roshaans roshaans requested a review from a team as a code owner July 25, 2023 21:45
@roshaans roshaans requested a review from morgsmccauley July 25, 2023 21:46
@roshaans roshaans changed the title feat: add fallback to old feed DPLT-1066 feat: add fallback to old feed Jul 25, 2023
Copy link
Collaborator

@morgsmccauley morgsmccauley left a comment

Choose a reason for hiding this comment

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

Since social_feed has the social.near contract filter, we'll essentially always have lag when there is a new post, since the indexer has not been triggered since the last post creating the lag. What this means is if we create a post, then immediately reload the feed, I think we'll fallback.

I don't think this is a problem, but perhaps something to keep in mind. What we'd really want is to check 'how long' we've been out of sync and fallback based on some time threshold. But this probably introduces too much complexity.

@morgsmccauley morgsmccauley merged commit 15773c6 into main Jul 26, 2023
@morgsmccauley morgsmccauley deleted the feat/fallback-for-feed-widget branch July 26, 2023 19:27
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