lib/octopus/proxy.rb in ar-octopus-0.0.12 vs lib/octopus/proxy.rb in ar-octopus-0.0.13

- old
+ new

@@ -11,11 +11,11 @@ @groups = {} @shards[:master] = ActiveRecord::Base.connection_pool() @current_shard = :master shards_config = config[Octopus.env()]["shards"] if have_a_valid_configuration?(config) shards_config ||= [] - + shards_config.each do |key, value| if value.has_key?("adapter") initialize_adapter(value['adapter']) @shards[key.to_sym] = connection_pool_for(value, "#{value['adapter']}_connection") else @@ -67,10 +67,10 @@ end def shard_name current_shard.is_a?(Array) ? current_shard.first : current_shard end - + def have_a_valid_configuration?(config) !config[Octopus.env()].nil? end def add_transaction_record(record)