Skip to content

Redis client with autoreconnection for slow clients (wrapper for stefanwille/crystal-redis). Used as part of redisoid shard.

License

Notifications You must be signed in to change notification settings

kostya/redis-reconnect

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

THIS PROJECT DEPRECATED, RECONNECTION LOGIC NOW IMPLEMENTED IN stefanwille/crystal-redis

redis-reconnect

Redis client with autoreconnection for slow clients (wrapper for stefanwille/crystal-redis). Used as part of redisoid shard.

Installation

Add this to your application's shard.yml:

dependencies:
  redis-reconnect:
    github: kostya/redis-reconnect

Usage

require "redis-reconnect"

r = Redis::Reconnect.new(host: "localhost", port: 6379)
r.set("bla", "a")
p r.get("bla")

Ok to use it with Pool (ysbaddaden/pool):

pool = ConnectionPool.new(capacity: 25) do
  Redis::Reconnect.new(host: "localhost", port: 6379)
end

pool.connection do |conn|
  conn.get "bla"
end

About

Redis client with autoreconnection for slow clients (wrapper for stefanwille/crystal-redis). Used as part of redisoid shard.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 2

  •  
  •