Sha256: db4cd985e3e8eba5a8ca6f0ba0dc59ad3dc4fbe1809b6c83fdbdabe7922a27b4

Contents?: true

Size: 424 Bytes

Versions: 2

Compression:

Stored size: 424 Bytes

Contents

# encoding: utf-8
module RedisHelpers
  def remotellen(lists)
    @remote_redis = Redis.new(
      :host => $redis.hget('config', 'remoteredis:host'),
      :port => $redis.hget('config', 'remoteredis:port'),
      :password => nil || $redis.hget('config', 'remoteredis:password')
    )
    result = Hash.new
    lists.each do |list|
      result.merge!(list => @remote_redis.llen(list))
    end
    return result
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
gaptool-server-0.2.4 lib/helpers/redis.rb
gaptool-server-0.2.3 lib/helpers/redis.rb