Skip to content
Open
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion BrainPortal/app/models/worker.rb
Original file line number Diff line number Diff line change
Expand Up @@ -431,7 +431,9 @@ def main_loop #:nodoc:
rescue => itswrong

self.worker_log.fatal "Exception raised: #{itswrong.class} : #{itswrong.message}"
unless itswrong.message =~ /server has gone away/
# do not trace MySql disconnects but trace bad syntax, timeout and other SQL... errors )
unless itsworng.is_a?(ActiveRecord::StatementInvalid) && (itswrong.message =~ /server has gone away/ ||
itswrong.message =~ /connect|down/i )
itswrong.backtrace.each do |line|
self.worker_log.fatal line
end
Expand Down