From f5c0dea1dde12c271c2739cfb3295fe394621ce4 Mon Sep 17 00:00:00 2001 From: Cristhian Garcia Date: Thu, 26 Oct 2023 15:32:27 -0500 Subject: [PATCH] fix: do not validate metadata source --- event_routing_backends/backends/events_router.py | 1 + event_routing_backends/handlers.py | 8 -------- 2 files changed, 1 insertion(+), 8 deletions(-) diff --git a/event_routing_backends/backends/events_router.py b/event_routing_backends/backends/events_router.py index 826ba06c..8a68a3c5 100644 --- a/event_routing_backends/backends/events_router.py +++ b/event_routing_backends/backends/events_router.py @@ -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 diff --git a/event_routing_backends/handlers.py b/event_routing_backends/handlers.py index 21c28b35..25d5a54d 100644 --- a/event_routing_backends/handlers.py +++ b/event_routing_backends/handlers.py @@ -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 @@ -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 = {