project-callisto / callisto-core

Report intake, escrow, matching and secure delivery code for Callisto, an online reporting system for sexual assault.
https://www.projectcallisto.org
GNU Affero General Public License v3.0
137 stars 54 forks source link

send emails & generate reports asynchronously #52

Open kelseyq opened 8 years ago

kelseyq commented 8 years ago

Looks like there are a lot of options for doing this in Python

willingc commented 8 years ago

Might be good to start with the Django cookicutter's suggestion for AnyMail since it avoids lock in for a single mail provider.

kelseyq commented 8 years ago

I think that might be a different issue--this one refers to running the code that generates reports & sends emails asynchronously, so the webapp can respond while that's happening.

willingc commented 8 years ago

Let me see if I've got the use case:

kelseyq commented 8 years ago

These calls: https://github.com/SexualHealthInnovations/callisto-core/blob/master/callisto/delivery/views.py#L47 https://github.com/SexualHealthInnovations/callisto-core/blob/master/callisto/delivery/views.py#L64 https://github.com/SexualHealthInnovations/callisto-core/blob/master/callisto/delivery/views.py#L123 potentially take a long time and could be handled in a coroutine/Celery/Twisted/other form of asynchronous process, allowing the site to return a response to the user while that's happening. Error handling would need to be considered. This is an idea for a future improvement and not a high-priority issue.

kelseyq commented 8 years ago

@willingc any ideas on tagging issues to indicate priority or scope?

willingc commented 8 years ago

@kelseyq Perhaps create milestones for next release, release + 1, wish list. Or labels with one color to signify priority [pri: critical], [pri: next release], [pri: wishlist]. Overall, keep it simple ;-)

willingc commented 8 years ago

Oh and you already are doing a great job tagging issues. 🎉