Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

redis_node_manager should start if no redis servers are available (#29)

  • Loading branch information...
commit 3566089a8045a8548dec8bd6e0b6a9c50accf48f 1 parent 36a2361
@ryanlecompte authored
Showing with 3 additions and 2 deletions.
  1. +1 −0  Changes.md
  2. +2 −2 lib/redis_failover/node_manager.rb
View
1  Changes.md
@@ -6,6 +6,7 @@ HEAD
- Introduce :safe_mode option (enabled by default). This option configures the client to purge its redis clients when a ZK session expires or when the client hasn't recently heard from the node manager.
- Introduce RedisFailover::Client#on_node_change callback notification for when the currently known list of master/slave redis nodes changes.
- Added #current_master and #current_slaves to RedisFailover::Client. This is useful for programmatically doing things based on the current master/slaves.
+- redis_node_manager should start if no redis servers are available (#29)
0.8.9
-----------
View
4 lib/redis_failover/node_manager.rb
@@ -219,13 +219,13 @@ def promote_new_master(node = nil)
def discover_nodes
@unavailable = []
nodes = @options[:nodes].map { |opts| Node.new(opts) }.uniq
- raise NoMasterError unless @master = find_master(nodes)
+ @master = find_master(nodes)
@slaves = nodes - [@master]
logger.info("Managing master (#{@master}) and slaves" +
" (#{@slaves.map(&:to_s).join(', ')})")
# ensure that slaves are correctly pointing to this master
- redirect_slaves_to(@master)
+ redirect_slaves_to(@master) if @master
end
# Spawns the {RedisFailover::NodeWatcher} instances for each managed node.
Please sign in to comment.
Something went wrong with that request. Please try again.