0.01
Repository is archived
No commit activity in last 3 years
No release in over 3 years
Adds a Redis::Retry class which can be used to proxy calls to Redis while automatically retrying when a connection cannot be made. This is useful to ensure that your applications don't fail if Redis is temporarily unavailable.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Runtime

>= 0
 Project Readme

redis-retry

Requires the redis gem.

Automatically retries all Redis calls if the Redis server is not available.

r = Redis::Retry.new(:tries => 3, :wait => 5, :redis => @r)

Redis::Retry will proxy all Redis calls. If a Errno::ECONNREFUSED error occurs, the command will be retried the specified number of times, waiting the specified number of seconds between tries. After all tries have been made unsuccessfully, the Errno::ECONNREFUSED will be raised.

Useful to ensure that apps don't fail when Redis is unavailable for a short amount of time.

Installation

$ gem install redis-retry

Author

Matt Duncan matt@mattduncan.org