Sha256: 7622d8902e39cd0448b4d2d5d24561dc145289dec62acffb050f2a2ec9307db5
Contents?: true
Size: 827 Bytes
Versions: 1
Compression:
Stored size: 827 Bytes
Contents
#!/usr/bin/env ruby require 'eventmachine' # the redis/synchrony gems need to be required in this particular order, see # the redis-rb README for details require 'hiredis' require 'em-synchrony' 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 logger = opts[:logger] super(:size => @size) { redis = ::Redis.new(config) Flapjack::Data::Migration.migrate_entity_check_data_if_required(:redis => redis, :logger => logger) Flapjack::Data::Migration.refresh_archive_index(:redis => redis) redis } end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
flapjack-1.2.0rc2 | lib/flapjack/redis_pool.rb |