Skip to content

Commit

Permalink
fix: rename tracking log event emitted
Browse files Browse the repository at this point in the history
  • Loading branch information
Ian2012 committed Nov 7, 2023
1 parent 43d983b commit a414e11
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions eventtracking/backends/event_bus.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
from datetime import datetime

from openedx_events.analytics.data import TrackingLogData
from openedx_events.analytics.signals import TRACKING_EVENT_EMITTED
from openedx_events.analytics.signals import TRACKING_LOG_EVENT_EMITTED
from openedx_events.event_bus import get_producer

from eventtracking.backends.routing import RoutingBackend
Expand All @@ -21,7 +21,7 @@ class EventBusRoutingBackend(RoutingBackend):
def send(self, event):
"""
Send the tracking log event to the event bus by emitting the
TRACKING_EVENT_EMITTED signal using custom metadata.
TRACKING_LOG_EVENT_EMITTED signal using custom metadata.
"""
if not SEND_TRACKING_EVENT_EMITTED_SIGNAL.is_enabled():
return
Expand All @@ -41,11 +41,11 @@ def send(self, event):
context=context,
)

metadata = TRACKING_EVENT_EMITTED.generate_signal_metadata()
metadata = TRACKING_LOG_EVENT_EMITTED.generate_signal_metadata()

logger.info(f"Sending tracking lof {tracking_log.name} to the event bus.")
get_producer().send(
signal=TRACKING_EVENT_EMITTED,
signal=TRACKING_LOG_EVENT_EMITTED,
topic="analytics",
event_key_field="tracking_log.name",
event_data={"tracking_log": tracking_log},
Expand Down

0 comments on commit a414e11

Please sign in to comment.