Skip to content

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