Skip to content

Commit

Permalink
Add support for Redis#client's location method. Fixes a compatibility…
Browse files Browse the repository at this point in the history
… issue with redis_failover and Sidekiq.
  • Loading branch information
ryanlecompte committed Oct 4, 2012
1 parent 1160e17 commit 01c875a
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
4 changes: 4 additions & 0 deletions Changes.md
@@ -1,3 +1,7 @@
HEAD
-----------
- Add support for Redis#client's location method. Fixes a compatibility issue with redis_failover and Sidekiq.

0.9.7.1
-----------
- Stop repeated attempts to acquire exclusive lock in Node Manager (#36)
Expand Down
8 changes: 8 additions & 0 deletions lib/redis_failover/client.rb
Expand Up @@ -79,6 +79,14 @@ def client(*args)
self
end

# Delegates to the underlying Redis client to fetch the location.
# This method always returns the location of the master.
#
# @return [String] the redis location
def location
dispatch(:client).location
end

# Specifies a callback to invoke when the current redis node list changes.
#
# @param [Proc] a callback with current master and slaves as arguments
Expand Down

0 comments on commit 01c875a

Please sign in to comment.