lib/maglev.rb
# passes a redis instance into the block provided. If Sidekiq is loaded then this will
# draw from its connection pool, otherwise Redis.current will be passed in.
passes a redis instance into the block provided. If Sidekiq is loaded then this will
draw from its connection pool, otherwise Redis.current will be passed in.
passes a redis instance into the block provided . If Sidekiq is loaded then this will draw from its connection pool otherwise Redis . current will be passed in .
def redis(&block)
      if defined?(::Sidekiq) && ::Sidekiq.respond_to?(:redis)
        ::Sidekiq.redis(&block)
      else
        block.call(Redis.current)
      end
    end
def redis ( & block ) if defined? ( :: Sidekiq ) && :: Sidekiq . respond_to? ( :redis ) :: Sidekiq . redis ( & block ) else block . call ( Redis . current ) end end
passes a redis instance into the block provided.
passes a redis instance into the block provided .
# TODO: utilize config and our own connection pool
block
<not_specific>