Sha256: c599fbca73175997127dacd0729d7785b5fd4352456b43a3636084600c45f13b
Contents?: true
Size: 558 Bytes
Versions: 3
Compression:
Stored size: 558 Bytes
Contents
# encoding: utf-8 module RedisCopy # Scan uses the SCAN family of commands, which were introduced in # the 2.8 branch of Redis, and after 3.0.5 of the redis-rb gem. class KeyEmitter::Scan implements KeyEmitter do |redis, *_| bin_version = Gem::Version.new(redis.info['redis_version']) bin_requirement = Gem::Requirement.new('>= 2.7.105') next false unless bin_requirement.satisfied_by?(bin_version) redis.respond_to?(:scan_each) end def keys @redis.scan_each(count: 1000, match: pattern) end end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
redis-copy-1.0.0 | lib/redis-copy/key-emitter/scan.rb |
redis-copy-1.0.0.rc.1 | lib/redis-copy/key-emitter/scan.rb |
redis-copy-1.0.0.rc.0 | lib/redis-copy/key-emitter/scan.rb |