I am a bit lost here. I want to send email using django on a post request. But I don't want the user to wait for a reply so I am sending it in a background thread. Also the emails are to be send every 30 seconds in a sequential order provided by the user.
But there is a option for the user to cancel sending the emails i.e a different post request to handle the cancel input.
How do I listen for cancel operation in the thread sending the email? How do I implement the 30 second delay? I thought of using sleep but if I do that then will it skip the cancel signal?