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

[NT-980] Updating the Optimizely events dispatch interval #1105

Merged
merged 1 commit into from
Mar 13, 2020

Conversation

ifbarrera
Copy link
Contributor

📲 What

Updates the dispatch interval for the DefaultEventDispatcher on Optimizely to 5 seconds to reduce likelihood of backend race condition.

🤔 Why

The default dispatch interval on the DefaultEventDispatcher used by Optimizely to dispatch events and impressions was 60 seconds. This caused a race condition where sometimes the Kickstarter Ruby backend would attempt to send conversion event for an experiment whose "impression" hadn't been dispatched yet from the iOS SDK. By reducing the dispatch interval we hope to mitigate this race condition.

🛠 How

  • Added the dispatchTimeInterval as part of the configureOptimizely output.
  • set this value to 5 seconds
  • added a test

Copy link
Contributor

@eoji eoji left a comment

Choose a reason for hiding this comment

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

LGTM, but I made it 2 seconds because I was able to complete a pledge in 3 seconds starting from the project page.

@ifbarrera ifbarrera merged commit 8e81d31 into master Mar 13, 2020
@ifbarrera ifbarrera deleted the NT-980-updating-flush-interval branch March 13, 2020 14:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants