-
Notifications
You must be signed in to change notification settings - Fork 1.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
When mails fail to send, queue them for later. #4782
Comments
We can use redis and resque for this . Resque also provide a web interface for admin. |
Actually, we already have redis and sidekiq setup so how about using them? Thanks! |
Thats great . yes we can use sidekiq also for this . Is there a web ui for it also? |
… On Wed, Feb 13, 2019 at 1:32 PM Himanshu Dewan ***@***.***> wrote:
Thats great . yes we can use sidekiq also for this . Is there a web ui for
it also?
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#4782 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AT6S9iDpbYNwYfZFNZCCzgxQaeWQpYJoks5vM8Z5gaJpZM4ayXiO>
.
|
Thats great . Then its better to use sidekiq and redis . We can create a background jobs/thread for the mails . |
Yup. you want to work on this @dewanhimanshu? Also, what do you think about this @icarito @jywarren? By queuing email for later, the user will not experience any delay or conflict in events like Signup, liking a comment, commenting, etc wherever email is sent in the background. Thanks! |
I will be difficult for me to work as my mid sem exams are comming . But thanks @gauravano for giving me this opportunity. User experience will remain smooth . Actually i have used background jobs in my projects and it improves the user experience . Mail will be send on seperate thread instead on main server thread. |
Yeah, I have also built a project in past using Redis and Resque, the user experience really improves with using queue. We can start this project after a week or two(I also have mid sem from next weekend 🙈). Let's work on this one in March or if someone wants to implement this, please go ahead. |
Thank you @gauravano . All the best for your exams also. |
Thank you! |
Ah, it looks like we can use
I believe we are already set up with all this! It's worth trying -- we can try to change any instance of We'd love help with this if anyone's interested! |
Because the default runner in ActiveJob is inline, i wonder if perhaps it won't even break the tests! https://weblog.rubyonrails.org/2014/8/20/Rails-4-2-beta1/ |
Well, here's an initial test for all admin mailings: #4967 |
This worked! #4967 It required wrapping tests in a block starting with We could merge this now, then repeat for remaining instances of https://github.com/publiclab/plots2/search?q=deliver_now |
I think we should be good to merge this, since it only affects admin emails. We can try it out before reapplying this to other email systems. I've opened a new issue to repeat this process in other parts of the codebase: |
Mail systems can sometimes have interruptions (e.g. we have a throttle from google for example).
Could we queue up failed outgoing emails?
There are subtle bugs like #4774 (comment) that are confusing and if we had a proper mail queue cache we would avoid them.
One non-coding way to do this is to implement an MTA container and configure it for such retry queue.
Or it can be done at the application level. MTAs are designed and for this task, but on the other hand this feature would only be pre-configured when running with Docker if we went the container path.
The text was updated successfully, but these errors were encountered: