lib/octopus/proxy.rb in ar-octopus-0.0.28 vs lib/octopus/proxy.rb in ar-octopus-0.0.29
- old
+ new
@@ -9,11 +9,14 @@
def initialize_shards(config)
@shards = {}
@groups = {}
@shards[:master] = ActiveRecord::Base.connection_pool()
@current_shard = :master
+ if !config.nil?
+ @entire_sharded = config['entire_sharded']
+ shards_config = config[Octopus.rails_env()]
+ end
- shards_config = config[Octopus.rails_env()] if !config.nil?
shards_config ||= []
shards_config.each do |key, value|
if value.has_key?("adapter")
initialize_adapter(value['adapter'])