Sha256: 0574833b5f68bd6334ca77b1898770f00927fa966a3a557d14eba66369f455ec
Contents?: true
Size: 381 Bytes
Versions: 16
Compression:
Stored size: 381 Bytes
Contents
class RedisResultRowCount EXPIRY = 1.hour def initialize(result) @result = result @redis = Redis.current end def ongoing_row_count @redis.get(redis_key) end def increment_count_by(amount) @redis.incrby(redis_key, amount) end def expire @redis.expire(redis_key, EXPIRY) end private def redis_key "{@result.id}_rowcount" end end
Version data entries
16 entries across 16 versions & 1 rubygems