Sha256: 803086c017b2487a668aa95236ff2540dc6680bb6027c6b9132a92472fcf965d
Contents?: true
Size: 791 Bytes
Versions: 19
Compression:
Stored size: 791 Bytes
Contents
module RedisFailover # Runner is responsible for bootstrapping the Node Manager. class Runner # Launches the Node Manager in a background thread. # # @param [Array] options the command-line options # @note this method blocks and does not return until the # Node Manager is gracefully stopped def self.run(options) options = CLI.parse(options) node_manager = NodeManager.new(options) trap_signals(node_manager) node_manager.start end # Traps shutdown signals. # @param [NodeManager] node_manager the node manager def self.trap_signals(node_manager) [:INT, :TERM].each do |signal| trap(signal) do node_manager.shutdown end end end private_class_method :trap_signals end end
Version data entries
19 entries across 19 versions & 3 rubygems