module Octoshark::ConnectionHandler

Public Instance Methods

establish_connection(*args, **kwargs) click to toggle source

def establish_connection(owner, spec) # Rails 3.x def establish_connection(config_or_env = nil) # Rails 4.x - 6.1 def establish_connection(config, owner_name:, role:, shard:) # Rails 6.2+

Calls superclass method
# File lib/octoshark/active_record_extensions.rb, line 6
def establish_connection(*args, **kwargs)
  Octoshark::ConnectionPoolsManager.reset_connection_managers!

  if kwargs.empty?
    # For backward compatibility with older versions of Rails on Ruby 3
    # that separates positional (args) and keyword arguments (kwargs).
    super(*args)
  else
    super(*args, **kwargs)
  end
end