Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add event bus backend #225

Closed
wants to merge 1 commit into from

Conversation

Ian2012
Copy link
Contributor

@Ian2012 Ian2012 commented Jun 2, 2023

Description

This PR creates a backend to emit the Open edX signal defined in openedx/openedx-events#230.

Testing instructions

  • Install openedx-events from the mentioned PR
  • Install event-tracking from this branch
  • Add the following setting:
EVENT_TRACKING_BACKENDS = {
    'xapi': {
        'ENGINE':  'eventtracking.backends.event_bus.EventBusRoutingBackend',
        'OPTIONS': { ## Not sure if this is needed
            'backend_name': 'xapi',
            'processors': [
                {
                }
            ],
     },
   },
}
  • Listen to the emitted signal and verify the data is received correctly for all the events.

For reference, here is the consumer code:

@receiver(TRACKING_EVENT_EMITTED)
def listen_for_tracking_event_emitted_event(sender, signal, **kwargs):
    """
    Prints `TRACKING_EVENT_EMITTED` events.
    """
    print("\n\n", kwargs, "\n\n")

@openedx-webhooks openedx-webhooks added the open-source-contribution PR author is not from Axim or 2U label Jun 2, 2023
@openedx-webhooks
Copy link

openedx-webhooks commented Jun 2, 2023

Thanks for the pull request, @Ian2012! Please note that it may take us up to several weeks or months to complete a review and merge your PR.

Feel free to add as much of the following information to the ticket as you can:

  • supporting documentation
  • Open edX discussion forum threads
  • timeline information ("this must be merged by XX date", and why that is)
  • partner information ("this is a course on edx.org")
  • any other information that can help Product understand the context for the PR

All technical communication about the code itself will be done via the GitHub pull request interface. As a reminder, our process documentation is here.

This is currently a draft pull request. When it is ready for our review and all tests are green, click "Ready for Review", or remove "WIP" from the title, as appropriate.

@Ian2012 Ian2012 force-pushed the cag/add-openedx-event-signal branch 2 times, most recently from 6e7f030 to 2fc6de0 Compare June 5, 2023 16:37
@Ian2012 Ian2012 marked this pull request as ready for review June 5, 2023 16:51
@Ian2012 Ian2012 force-pushed the cag/add-openedx-event-signal branch 2 times, most recently from f8b51d8 to 6e16d97 Compare June 6, 2023 16:58
@bmtcril
Copy link
Contributor

bmtcril commented Jun 6, 2023

Can you add some basic tests like the async backend has? I think this will also require openedx-events in base.in requirements now as well.

@Ian2012 Ian2012 force-pushed the cag/add-openedx-event-signal branch from 6e16d97 to 5ced371 Compare June 7, 2023 18:24
@Ian2012 Ian2012 force-pushed the cag/add-openedx-event-signal branch 3 times, most recently from 8e050c1 to 9cd48de Compare June 8, 2023 13:27
@Ian2012 Ian2012 force-pushed the cag/add-openedx-event-signal branch from 9cd48de to 3266aa2 Compare June 8, 2023 13:31
@Ian2012
Copy link
Contributor Author

Ian2012 commented Jun 8, 2023

@bmtcril There are some tests implemented now, it will fail till the openedx signal is merged

@Ian2012 Ian2012 marked this pull request as draft June 14, 2023 14:52
@mphilbrick211
Copy link

Hi @Ian2012 - checking in to see if you plan to pursue this pull request?

@mphilbrick211 mphilbrick211 added the inactive PR author has been unresponsive for several months label Oct 3, 2023
@mphilbrick211 mphilbrick211 added closed inactivity PR was closed because the author abandoned it and removed inactive PR author has been unresponsive for several months labels Oct 24, 2023
@mphilbrick211
Copy link

Closing this PR due to inactivity.

@openedx-webhooks
Copy link

@Ian2012 Even though your pull request wasn’t merged, please take a moment to answer a two question survey so we can improve your experience in the future.

1 similar comment
@openedx-webhooks
Copy link

@Ian2012 Even though your pull request wasn’t merged, please take a moment to answer a two question survey so we can improve your experience in the future.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
closed inactivity PR was closed because the author abandoned it open-source-contribution PR author is not from Axim or 2U
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

5 participants