lib/rails_failover/redis/handler.rb in rails_failover-0.5.5 vs lib/rails_failover/redis/handler.rb in rails_failover-0.5.6
- old
+ new
@@ -61,10 +61,10 @@
frequency = RailsFailover::Redis.verify_primary_frequency_seconds
sleep(frequency * ((rand(VERIFY_FREQUENCY_BUFFER_PRECENT) + 100) / 100.0))
active_primaries_keys = {}
- primaries_down.each do |key, options|
+ mon_synchronize { primaries_down.dup }.each do |key, options|
info = nil
options = options.dup
begin
options[:driver] = options[:original_driver]