redis-reconnect

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

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
Repository

redis-reconnect

Owner
Statistic
  • 7
  • 2
  • 0
  • 1
  • 1
  • almost 6 years ago
  • July 14, 2016
License

MIT License

Links
Synced at

Wed, 15 May 2024 20:05:56 GMT

Languages