Class: Eventboss::ErrorHandlers::DbConnectionDropHandler

Inherits:
Object
  • Object
show all
Defined in:
lib/eventboss/error_handlers/db_connection_drop_handler.rb

Instance Method Summary collapse

Instance Method Details

#call(exception, _context = {}) ⇒ Object



4
5
6
7
8
# File 'lib/eventboss/error_handlers/db_connection_drop_handler.rb', line 4

def call(exception, _context = {})
  if exception.class == ::ActiveRecord::StatementInvalid
    ::ActiveRecord::Base.clear_active_connections!
  end
end