diff --git a/docs/quickstarts/use-events-to-call-webhook.rst b/docs/quickstarts/use-events-to-call-webhook.rst index 4ab45336..5a56bc81 100644 --- a/docs/quickstarts/use-events-to-call-webhook.rst +++ b/docs/quickstarts/use-events-to-call-webhook.rst @@ -4,24 +4,19 @@ Using Open edX Events in the LMS service Live example ------------ -For a complete and detailed example you can see the `openedx-events-2-zapier`_ -plugin. This is a fully functional plugin that connects to -``STUDENT_REGISTRATION_COMPLETED`` and ``COURSE_ENROLLMENT_CREATED`` and sends -the relevant information to zapier.com using a webhook. +For a complete and detailed example you can see the `openedx-events-2-zapier`_ plugin. This is a fully functional plugin that connects to ``STUDENT_REGISTRATION_COMPLETED`` and ``COURSE_ENROLLMENT_CREATED`` and sends the relevant information to zapier.com using a webhook. Let's see it working! Setup your environment ---------------------- -This tutorial assumes you're using `Tutor`_ > 13.x and its default services are -already provisioned. +This tutorial assumes you're using `Tutor`_ > 13.x and its default services are already provisioned. Installation ------------ -For this tutorial to work, you'll need a openedx image with the following package -installed: +For this tutorial to work, you'll need a openedx image with the following package installed: - `openedx-events-2-zapier`_ @@ -30,11 +25,9 @@ You can use your preferred method for installing new packages in Tutor. Configuration ------------- -The package we just installed is a `Django plugin`_, which adds additional -configurations to our working environment thanks to the extension mechanisms put in place. Now, -:term:`event receivers ` are listening to the registration and enrollment events sent within the LMS service. +The package we just installed is a `Django plugin`_, which adds additional configurations to our working environment thanks to the extension mechanisms put in place. Now, :term:`event receivers ` are listening to the registration and enrollment events sent within the LMS service. -The following is the implementation for the `event receivers ` listening for the event ``STUDENT_REGISTRATION_COMPLETED``: +The following is the implementation for the :term:`event receivers ` listening for the event ``STUDENT_REGISTRATION_COMPLETED``: .. code-block:: python @@ -97,9 +90,7 @@ The following is the implementation for the `event receivers ` l flatten_dict(zapier_payload), ) -Those `event receivers ` work out of the box after the plugin installation. Now, we must -set the plugin settings which indicate where to send the events data. For this, -go to ``env/apps/openedx/settings/development.py`` and add your Zapier configuration: +Those :term:`event receivers ` work out of the box after the plugin installation. Now, we must set the plugin settings which indicate where to send the events data. For this, go to ``env/apps/openedx/settings/development.py`` and add your Zapier configuration: .. code-block:: python @@ -109,13 +100,13 @@ go to ``env/apps/openedx/settings/development.py`` and add your Zapier configura Getting data from Zapier ------------------------ -Now that you have configured both `event receivers `, you'll need to trigger the events -so you receive the events data in Zapier. Try it out! +Now that you have configured both :term:`event receivers `, you'll need to trigger the events so you receive the events data in Zapier. Try it out! + +.. warning:: + The `event receiver ` function implemented in this tutorial was intended to be lightweight, just to serve as an example for event receivers. However, in production + settings, we encourage the use of asynchronous tasks to avoid creating bottlenecks. .. _openedx-events-2-zapier: https://github.com/eduNEXT/openedx-events-2-zapier .. _Tutor: https://github.com/overhangio/tutor .. _Django plugin: https://github.com/openedx/edx-django-utils/blob/master/edx_django_utils/plugins/README.rst -.. warning:: - The `event receiver ` function implemented in this tutorial was intended to be lightweight, just to serve as an example for event receivers. However, in production - settings, we encourage the use of asynchronous tasks to avoid creating bottlenecks.