Skip to content

Commit

Permalink
Revert "turn off begin/rescue loop in mailman_server script (#5840)"
Browse files Browse the repository at this point in the history
This reverts commit d084918.
  • Loading branch information
icarito authored Nov 18, 2019
1 parent 6aad743 commit 22368d3
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions script/mailman_server
Original file line number Diff line number Diff line change
Expand Up @@ -23,19 +23,18 @@ Mailman::Application.run do
# routes are written here
# route for mail having node with id in their subject will only be accepted for processing
default do
# REMOVING ENTIRE 'begin/rescue' loop to try to address mailmain issues
# begin
# retries ||= 0
begin
retries ||= 0
# do something with the database that does not fetch mails yet (let's try to ensure we have a MySQL connection first)
puts Comment.last.inspect
Comment.receive_mail(message)
# rescue Exception => e
# Mailman.logger.error "Exception occurred while receiving message:\n#{message}"
# Mailman.logger.error [e, *e.backtrace].join("\n")
rescue Exception => e
Mailman.logger.error "Exception occurred while receiving message:\n#{message}"
Mailman.logger.error [e, *e.backtrace].join("\n")
# Seeing major site slowdowns; commenting out for now;
# https://github.com/publiclab/plots2/issues/5817
# retry if (retries += 1) < 3
# end
end
end

end

0 comments on commit 22368d3

Please sign in to comment.