lib/redis_failover/runner.rb in redis_failover-0.4.0 vs lib/redis_failover/runner.rb in redis_failover-0.5.0
- old
+ new
@@ -1,15 +1,14 @@
module RedisFailover
- # Runner is responsible for bootstrapping the redis failover server.
+ # Runner is responsible for bootstrapping the redis Node Manager.
class Runner
def self.run(options)
options = CLI.parse(options)
- Util.logger.info("Redis Failover Server starting on port #{options[:port]}")
- Server.set(:port, options[:port])
@node_manager = NodeManager.new(options)
- server_thread = Thread.new { Server.run! { |server| trap_signals } }
+ trap_signals
node_manager_thread = Thread.new { @node_manager.start }
- [server_thread, node_manager_thread].each(&:join)
+ Util.logger.info("Redis Node Manager successfully started.")
+ node_manager_thread.join
end
def self.node_manager
@node_manager
end