lib/redis_failover/client.rb in nogara-redis_failover-0.8.10 vs lib/redis_failover/client.rb in nogara-redis_failover-0.8.11
- old
+ new
@@ -62,9 +62,16 @@
parse_options(options)
setup_zk
build_clients
end
+
+ # Resque wants to use Resque.redis.reconnect to recreate all connections. So
+ # we provide ourselves as a client to receive the "reconnect" message
+ def client
+ self
+ end
+
# Specifies a callback to invoke when the current redis node list changes.
#
# @param [Proc] a callback with current master and slaves as arguments
#
# @example Usage