Skip to content

GUI won't update on comment email 500 failure #403

Open
@ain

Description

@ain

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:

screen shot 2015-01-17 at 13 31 02

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions