Open DevilsAutumn opened 2 weeks ago
I will investigate this.
Its regression from previous work over EventAdmin
and send_email
.
send_email_to_selected_users
used in send_email_to_selected_users
uses built in send_maass_email
.
which is not being handled separately by background worker and crashes the server.
We need to handle this via celery as a background task, perhaps make a whole mini interface framework for all the emails to be a task by default.
We would also want to store the email info we are sending to users at different workflow events.
currently this is being handled by Update
model though I would argue structural approach will save use the unnecessary queries.
We should create a separate template dir containing different email HTML (jinja)
templates with place holders
and use render_to_string
to convert it into customised string to be passed in email_body
parameter for send_email
function.
This also helps us beautify emails with HTML and CSS.
CC: @DevilsAutumn
Description
Not sure can we reproduce this on local. But i suspect the problem is in this method.For large number of users, the url becomes too long that it breaks the nginx(I am not sure if this is the exact reason though). Plus this mail is not even stored anywhere which is inefficient. We must store every type communication we are having with the users.
Steps to Reproduce
na
Expected Behavior
na
Actual Behavior
na
Additional Context
No response
Affected Area
Backend
Version
No response
Browser (if frontend)
No response