Skip to content

Commit

Permalink
fix: do not validate metadata source
Browse files Browse the repository at this point in the history
  • Loading branch information
Ian2012 committed Oct 26, 2023
1 parent d80db69 commit f5c0dea
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 8 deletions.
1 change: 1 addition & 0 deletions event_routing_backends/backends/events_router.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ def __init__(self, processors=None, backend_name=None, sync=False):
Arguments:
processors (list): list of processor instances
backend_name (str): name of the router backend
sync (bool): whether to send events synchronously or in celery tasks
"""
self.processors = processors if processors else []
self.backend_name = backend_name
Expand Down
8 changes: 0 additions & 8 deletions event_routing_backends/handlers.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
from eventtracking.tracker import get_tracker
from openedx_events.analytics.signals import TRACKING_EVENT_EMITTED

from eventtracking.backends.event_bus import EVENT_BUS_SOURCE

from eventtracking.backends.event_bus import EventBusRoutingBackend

Expand All @@ -22,13 +21,6 @@ def send_tracking_log_to_backends(sender, signal, **kwargs):
"""
Listen for the TRACKING_EVENT_EMITTED signal and send the event to the enabled backend.
"""
metadata = kwargs.get("metadata")
if EVENT_BUS_SOURCE != metadata.source:
# This event cannot be processed by the same service that produced it.
# We need to wait for the event to be processed by the event bus.
logger.info("Event in same source, skipping event")
return

tracking_log = kwargs.get("tracking_log")

event = {
Expand Down

0 comments on commit f5c0dea

Please sign in to comment.