Class: Eventboss::ErrorHandlers::DbConnectionNotEstablishedHandler

Inherits:
Object
  • Object
show all
Defined in:
lib/eventboss/error_handlers/db_connection_not_established_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_not_established_handler.rb', line 4

def call(exception, _context = {})
  if exception.class == ::ActiveRecord::ConnectionNotEstablished
    ::ActiveRecord::Base.connection.reconnect!
  end
end