Closed pwnage101 closed 2 months ago
@mariajgrimaldi please take a look when you have a chance!
@pwnage101 it'll probably be useful for Maria or others in the community to paste in some context from ENT-9213 (which they won't be able to access). Also maybe add links to the edx-enterprise models that this new signal-data correspond to.
Fair, so first here's the ticket body for ENT-9213:
Background
There is an enterprise-subsidy cron job that writes reversals from recently unenrolled records to get transactions into a reversed state (at which point we'll send an event that causes the corresponding assignment to be reversed). We should eliminate that cron/mgmt command and replace it with an event producer/consumer.
AC
- Add a new event for enterprise unenrollment events
LearnerCreditEnterpriseCourseEnrollment
- In particular, we want to know when an
EnterpriseCourseEnrollment
becomes unenrolled, and then send data about that enrollment and its related fulfillment record onto the event bus.- Ensure transaction ID is in the message
- https://github.com/openedx/edx-enterprise/blob/d7e67a82fad599509ecd06a5ef7b52bbc8e3fe29/enterprise/models.py#L2325C7-L2325C46
- enterprise-subsidy consumes these events in real time and writes reversal for that one learner.
- Ensure that enterprise-subsidy has appropriate roles, ACLs, API keys etc. to be a consumer of openedx events.
Here's a list of all other openedx PRs which are all part of this same ticket:
Hi folks! Thank you for your contribution. I'll be reviewing this as soon as I can. Thanks for the patience!
FYI, I also updated the docstrings with direct links to django models in openedx code.
@mariajgrimaldi please merge at your earliest convenience, as I do not have write access to this repository.
ENT-9213