lib/flapjack/redis_pool.rb in flapjack-0.9.5 vs lib/flapjack/redis_pool.rb in flapjack-0.9.6

- old
+ new

@@ -8,17 +8,21 @@ require 'redis/connection/synchrony' require 'redis' require 'em-synchrony/connection_pool' +require 'flapjack/data/migration' + module Flapjack class RedisPool < EventMachine::Synchrony::ConnectionPool def initialize(opts = {}) config = opts.delete(:config) - @size = opts[:size] || 5 + @size = opts[:size] || 5 super(:size => @size) { - ::Redis.new(config) + redis = ::Redis.new(config) + Flapjack::Data::Migration.refresh_archive_index(:redis => redis) + redis } end end end