Module: Octoball::ConnectionHandlerSetCurrentShard

Defined in:
lib/octoball/connection_adapters.rb

Instance Method Summary collapse

Instance Method Details

#retrieve_connection(spec_name, role: ActiveRecord::Base.current_role, shard: ActiveRecord::Base.current_shard) ⇒ Object



5
6
7
8
9
# File 'lib/octoball/connection_adapters.rb', line 5

def retrieve_connection(spec_name, role: ActiveRecord::Base.current_role, shard: ActiveRecord::Base.current_shard)
  conn = super
  conn.current_shard = shard
  conn
end