Skip to content

fix(analytics): add validation for flushInterval #12498

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

Draft
wants to merge 2 commits into
base: next/main
Choose a base branch
from

Conversation

5d
Copy link

@5d 5d commented Nov 2, 2023

Description of changes

  • instead of using setInterval, update Analytics EventBuffer to use setTimeout for perodic event submission jobs.
    • note on behavior change:
      • previously: the action callback set with setInterval will reliably activate at regular intervals, each time spanning the duration specified by flushInterval.
      • with this change: the action callback set with setTimeout will wait for the completion previous callback, and then initiates after flushInterval period of time.
  • add validation check on Analytics event buffer's flushInterval.
    • it should greater than or equal to the min value (100ms).

Issue #, if available

Description of how you validated changes

  • unit test cases added

Checklist

  • PR description included
  • yarn test passes
  • Tests are changed or added
  • Relevant documentation is changed or added (and PR referenced)

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@5d 5d changed the title fix(analytics): add validation for flushInterval bottom fix(analytics): add validation for flushInterval Nov 2, 2023
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.

1 participant