Open
Description
When emails are pushed on a new comment to multiple accounts (e.g. 3) and server throws up with 500 (reason unclear), it doesn't make it back to the GUI and submission loader runs infinitely:
Log:
Started POST "/comments" for <IP> at 2015-01-17 12:30:43 +0000
Processing by CommentsController#create as JS
Parameters: {"utf8"=>"✓", "authenticity_token"=>"R4Gy3PQOwaRDvnoYx3iiyEZYeLGPyPmGoF51nwGWQ6c=", "comment"=>{"commentable_id"=>"77", "commentable_type"=>"Account", "comment"=>"Testing against processing timeout as by DRMS-50"}, "commit"=>"Add Note"}
Rendered subscription_mailer/comment_notification.text.erb (0.9ms)
Sent mail to user0@email.com (3071.9ms)
Rendered subscription_mailer/comment_notification.text.erb (0.8ms)
Sent mail to user1@email.com (2984.7ms)
Rendered subscription_mailer/comment_notification.text.erb (0.7ms)
Sent mail to user2@email.com (2977.4ms)
Rendered subscription_mailer/comment_notification.text.erb (0.7ms)
Sent mail to user3@email.com (30012.2ms)
Completed 500 Internal Server Error in 39154.5ms
Net::OpenTimeout (execution expired):
app/models/polymorphic/comment.rb:49:in `block in notify_subscribers'
app/models/polymorphic/comment.rb:47:in `each'
app/models/polymorphic/comment.rb:47:in `notify_subscribers'
app/controllers/comments_controller.rb:57:in `create'
I'd propose to catch this and act accordingly in GUI as well.