Skip to content

Conversation

@ccantillo
Copy link

Description

This PR hooks into the Open edX user retirement pipeline to permanently delete the user after the retirement steps complete, enabling email reuse per MetaRed policy.

Changes included:

  • Adds EoxCoreConfig.ready() to import eox_core.handlers and register signal receivers.
  • Adds a signal handler for USER_RETIRE_LMS_MISC that schedules a Celery task with a short delay to avoid race conditions while the pipeline is still saving the user.
  • Adds delete_user_task Celery task (with retries) that deletes the user by id and logs success/failures.

Additional information

  • Uses the retirement signal step USER_RETIRE_LMS_MISC and performs deletion asynchronously to avoid conflicts with the sender still persisting the user instance.
  • Task retries up to 3 times with a short delay and handles “already deleted” safely.
  • Queue/routing is explicitly set to edx.lms.core.default.

@ccantillo ccantillo requested a review from a team as a code owner January 27, 2026 14:51
@BryanttV BryanttV merged commit df77c76 into eduNEXT:soa-metared Jan 27, 2026
1 of 3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants