Class: Redis

Inherits:
Object
  • Object
show all
Defined in:
lib/daikon/redis_hacks.rb

Overview

All of this craziness is necessary since redis-rb doesn’t support the old way of connecting to MONITOR since it doesn’t return the format bytes

Defined Under Namespace

Modules: ConnectionHacks Classes: Client, Connection

Instance Method Summary collapse

Instance Method Details

#monitor(&block) ⇒ Object



5
6
7
8
9
10
11
12
13
# File 'lib/daikon/redis_hacks.rb', line 5

def monitor(&block)
  @_redis_version ||= info["redis_version"]

  if @_redis_version < "2"
    @client.call_loop_with_old_protocol(:monitor, &block)
  else
    @client.call_loop(:monitor, &block)
  end
end