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

Delayed pushes will only run once per record #425

Merged
merged 3 commits into from
Sep 23, 2016

Conversation

tstirrat
Copy link
Contributor

Description

Prevents thrashing of delayed store.push on the same record in short succession.

@olivierchatry thanks for your work in #421, this is adapted from that. I improved it so that it handles duplicate pushes anywhere in the current queue, rather than only checking last payload. I also took the opportunity to clean up/rename the _enqueue method which was only used for one purpose.

/see #420

@olivierchatry
Copy link
Contributor

Make sense, I was a bit afraid of not merging new push with old push, but I guess Firebase always send the full update :).

@tstirrat
Copy link
Contributor Author

Yeah, I considered that. In this case we are always getting the new data from a ref.on('value') which gives the entire new value.

@olivierchatry
Copy link
Contributor

Can't wait to have it on a new version then :) Should I close my other PR ?

@tstirrat tstirrat mentioned this pull request Sep 16, 2016
Copy link
Contributor

@jamesdaniels jamesdaniels left a comment

Choose a reason for hiding this comment

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

LGTM

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