Skip to content

Commit

Permalink
feat: emit completion events (#3)
Browse files Browse the repository at this point in the history
  • Loading branch information
andrey-canon authored Dec 12, 2024
1 parent 2dfb6e2 commit 428cded
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,4 +52,4 @@ jobs:
with:
token: ${{ secrets.CODECOV_TOKEN }}
flags: unittests
fail_ci_if_error: true
fail_ci_if_error: false
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 428cded

Please sign in to comment.