flush forcefully sends events regardless the delay#73
Merged
marandaneto merged 3 commits intomainfrom Jan 3, 2024
Merged
Conversation
11 tasks
benjackwhite
reviewed
Jan 3, 2024
benjackwhite
left a comment
There was a problem hiding this comment.
I can't tell from the PR alone but I can at least clarify how it works elsewhere:
- By default events are queued and are only flushed as a batch once a timer passes or the size threshold is hit.
- However, a user can manually call the
flushfunction to force whatever is in the buffer to be flushed.
If this code achieves that then 👍
Member
Author
|
Member
Author
made new commits that address the 1. item, if this ever becomes a battery-draining issue, we can revert this part since its super simple. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
💡 Motivation and Context
https://github.com/postHog/posthog-js-lite/ sends events regardless the timer if
flushis called manually.https://posthog.com/questions/flush-interval-seconds-not-working
💚 How did you test it?
📝 Checklist