Sha256: 3704205b9109e750d7ce77825f53eaed557a386476ed4dd9fdf706cf69de6e1c

Contents?: true

Size: 390 Bytes

Versions: 14

Compression:

Stored size: 390 Bytes

Contents

require 'redis'
require 'redis-sentinel'

redis = Redis.new(:master_name => "example-test",
                  :sentinels => [
                    {:host => "localhost", :port => 26379},
                    {:host => "localhost", :port => 26380}
                  ])
redis.set "foo", "bar"

while true
  begin
    puts redis.get "foo"
  rescue => e
    puts "failed?", e
  end
  sleep 1
end

Version data entries

14 entries across 14 versions & 3 rubygems

Version Path
redic-sentinel-1.5.1 example/test.rb
redis-sentinel-1.5.0 example/test.rb
redis-sentinel-1.4.4 example/test.rb
redis-sentinel-1.4.3 example/test.rb
redis-sentinel-1.4.2 example/test.rb
redis-sentinel-1.4.1 example/test.rb
redis-sentinel-1.4.0 example/test.rb
redis-sentinel2-1.3.1 example/test.rb
redis-sentinel2-1.3.0 example/test.rb
redis-sentinel-1.3.0 example/test.rb
redis-sentinel-1.2.0 example/test.rb
redis-sentinel-1.1.4 example/test.rb
redis-sentinel-1.1.3 example/test.rb
redis-sentinel-1.1.2 example/test.rb