Skip to content

Conversation

@kaustavb12
Copy link
Member

@kaustavb12 kaustavb12 commented Aug 5, 2025

Description

This PR brings two changes to all the management command based on SendEmailBaseCommand:

  1. Add ability to pass a list of middlewares to override the default list of middlewares used to emulate http requests in the async message tasks - This would be very helpful for instances running custom middlewares which they want to apply to recurring messages.
  2. Add ability to run the management command for all sites by not passing any site domain. This would be helpful for instances running lots of sites who would otherwise need to run the same command individually for each site.

Testing instructions

  1. Set up this branch in a sandbox.
  2. Set up two or more sites with course_org_filter setup for each site to map it to a unique org.
  3. Create courses for each site/org and enroll in them.
  4. Make sure date conditions for recurring nudges are satisfied for the enrollments and run the send_recurring_nudge command without passing any site domain name.
  5. Make sure emails from each site/org are triggered.

Other information

Private Ref : BB-9883

@kaustavb12 kaustavb12 force-pushed the kaustav/use_custom_middlewares_recurring_nudges branch 2 times, most recently from 809563e to 0786504 Compare August 14, 2025 09:39
Copy link
Member

@samuelallan72 samuelallan72 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @kaustavb12 . I just had some queries about the command args.

@samuelallan72
Copy link
Member

Aside from the queries about the arguments, everything looks good to me! :)

@kaustavb12 kaustavb12 force-pushed the kaustav/use_custom_middlewares_recurring_nudges branch from b0b3394 to 21323ab Compare August 15, 2025 10:51
Copy link
Member

@samuelallan72 samuelallan72 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 (just a couple of small nits, but otherwise all good!)

  • I tested this: tested in the sandbox
  • I read through the code
  • I checked for accessibility issues
  • Includes documentation
  • @kaustavb12 unsure if this counts - do we need to do this? I guess we would want to upstream this patch too. [ ] Added to the Code Drift project board (for backports)

@kaustavb12 kaustavb12 force-pushed the kaustav/use_custom_middlewares_recurring_nudges branch from ca90c97 to a58135a Compare August 18, 2025 11:57
@kaustavb12 kaustavb12 merged commit 759e8f0 into opencraft-release/sumac.1 Aug 18, 2025
49 checks passed
@kaustavb12 kaustavb12 deleted the kaustav/use_custom_middlewares_recurring_nudges branch August 18, 2025 12:44
kaustavb12 added a commit that referenced this pull request Aug 23, 2025
* feat: add ability to override middlewares for recurring nudges

* feat: add ability to run command for all sites
Cup0fCoffee pushed a commit that referenced this pull request Oct 12, 2025
* feat: add ability to override middlewares for recurring nudges

* feat: add ability to run command for all sites

(cherry picked from commit 759e8f0)
Cup0fCoffee pushed a commit that referenced this pull request Oct 14, 2025
* feat: add ability to override middlewares for recurring nudges

* feat: add ability to run command for all sites

(cherry picked from commit 759e8f0)
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.

3 participants