Sha256: 00e0bed967b170da0e0ccea77c43fb332905ac7fa60b0c433f67997c3ae05041
Contents?: true
Size: 804 Bytes
Versions: 12
Compression:
Stored size: 804 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_thread = Thread.new { @node_manager.start } node_manager_thread.join end # Traps shutdown signals. def self.trap_signals [:INT, :TERM].each do |signal| trap(signal) do Util.logger.info('Shutting down ...') @node_manager.shutdown exit(0) end end end end end
Version data entries
12 entries across 12 versions & 2 rubygems