Skip to content

Commit

Permalink
feat: emit completion events
Browse files Browse the repository at this point in the history
  • Loading branch information
andrey-canon committed Dec 11, 2024
1 parent 2dfb6e2 commit 3684aca
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion completion_aggregator/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -190,12 +190,13 @@ def emit_completion_aggregator_logs(updated_aggregators):
return

for aggregator in updated_aggregators:
event = "progress" if aggregator.percent < 1 else "completion"
block_type = aggregator.aggregation_name

if block_type not in settings.COMPLETION_AGGREGATOR_TRACKING_EVENT_TYPES:
continue

event_name = f"openedx.completion_aggregator.progress.{block_type}"
event_name = f"openedx.completion_aggregator.{event}.{block_type}"

tracker.emit(
event_name,
Expand Down

0 comments on commit 3684aca

Please sign in to comment.