diff --git a/script/mailman_server b/script/mailman_server index ea5bb4a629..eeaab4ef65 100755 --- a/script/mailman_server +++ b/script/mailman_server @@ -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