-
Notifications
You must be signed in to change notification settings - Fork 28
feat(eventProcessor): Incorporate batch processing into OptimizelyFactory. #198
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Requesting changes to get it out of queues until it's based on master.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
few minor comments.
lib/optimizely/optimizely_factory.rb
Outdated
unless batch_size.is_a? Integer | ||
logger.log( | ||
Logger::ERROR, | ||
'Batch size has invalid type. Reverting to default configuration.' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please change this message to
Batch size is invalid, setting to default batch size {batchSize}
lib/optimizely/optimizely_factory.rb
Outdated
unless batch_size.positive? | ||
logger.log( | ||
Logger::ERROR, | ||
'Batch size cannot be <= 0. Reverting to default configuration.' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Batch size is negative, setting to default batch size {batchSize}
lib/optimizely/optimizely_factory.rb
Outdated
unless flush_interval.is_a? Numeric | ||
logger.log( | ||
Logger::ERROR, | ||
'Flush interval has invalid type. Reverting to default configuration.' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please change these msgs too.
lib/optimizely/optimizely_factory.rb
Outdated
unless flush_interval.positive? | ||
logger.log( | ||
Logger::ERROR, | ||
'Flush interval cannot be <= 0. Reverting to default configuration.' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this one as well. @oakbani
@@ -57,6 +105,13 @@ def self.custom_instance( | |||
config_manager = nil, | |||
notification_center = nil | |||
) | |||
event_processor = BatchEventProcessor.new( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you please add in a doc, default batchsize and flush_interval will be used to setup batchEventProcessor.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
@msohailhussain Could you please review the updates from @rashidsp ? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
Summary
BatchEventProcessor
withOptimizelyFactory
.Test plan