feat(notification-center): Adds LogEvent notification#2
Open
mariamjamal94 wants to merge 28 commits intobatch_event_processorfrom
Open
feat(notification-center): Adds LogEvent notification#2mariamjamal94 wants to merge 28 commits intobatch_event_processorfrom
mariamjamal94 wants to merge 28 commits intobatch_event_processorfrom
Conversation
msohailhussain
suggested changes
Aug 8, 2019
optimizely/event/event_processor.py
Outdated
| logger, | ||
| default_start=False, | ||
| event_queue=None, | ||
| notification_center=None, |
There was a problem hiding this comment.
add at the last. One general rule, if you are adding any new arg in the existing code, then don't add it in the middle, add it at the last.
| self.event_dispatcher = event_dispatcher | ||
| self.logger = logger | ||
| self.event_queue = event_queue or queue.Queue(maxsize=self._DEFAULT_QUEUE_CAPACITY) | ||
| self.notification_center = notification_center |
There was a problem hiding this comment.
what if notification center is not set.
Owner
Author
There was a problem hiding this comment.
Default value for notification_center is set to None. Before sending out a notification, the condition for it being not None is checked.
notification_center=None,
if self.notification_center is not None:
self.notification_center.send_notifications(
enums.NotificationTypes.LOG_EVENT,
log_event
)
|
|
||
| from . import base | ||
| from optimizely.logger import SimpleLogger | ||
| from optimizely.event.log_event import LogEvent |
added 9 commits
August 9, 2019 10:57
# Conflicts: # optimizely/event/entity/user_event.py # optimizely/event/entity/visitor.py
# Conflicts: # optimizely/event/event_processor.py # tests/test_event_processor.py
…riamjamal32/python-sdk into mjamal/log_event_notification # Conflicts: # optimizely/event/event_processor.py # tests/test_event_processor.py
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.
Summary
Test plan