openedx / edx-django-utils

edX utilities for Django Application development.
https://edx.readthedocs.io/projects/edx-django-utils/en/latest/
Apache License 2.0
26 stars 20 forks source link

[BD-32] feat: add async feature to Hooks Extension Framework tooling #111

Closed mariajgrimaldi closed 3 years ago

mariajgrimaldi commented 3 years ago

Description:

This PR allows the Hooks Extension Framework: Pipeline (check out its ADR) defined in PR 110 to run asynchronously using celery tasks.

JIRA:

XXX-XXXX

Dependencies:

BE AWARE This PR depends on Hooks Extension Framework: Tooling

Merge deadline:

None

Installation instructions:

List any non-trivial installation instructions.

Testing instructions:

  1. Open page A
  2. Do thing B
  3. Expect C to happen
  4. If D happened instead - check failed.

Reviewers:

Merge checklist:

Post merge:

Author concerns:

openedx-webhooks commented 3 years ago

Thanks for the pull request, @mariajgrimaldi! I've created BLENDED-809 to keep track of it in Jira.

When this pull request is ready, tag your edX technical lead.

regisb commented 3 years ago

@mariajgrimaldi Is this ready for review? Please tag me whenever it is.

mariajgrimaldi commented 3 years ago

Hey @regisb, thanks for your reply!

Before reviewing this, please check out the thread on discuss about Hooks Extension Framework. In there, you'll find more context about this PR and PR 110.

mariajgrimaldi commented 3 years ago

The discuss and OEP feedback has led us to remove native support for async.

It is therefore preferable for events to follow the pattern:

Listen on a signal and then create the async task

But that will be the responsibility of whoever writes the action.