Class: Droonga::Command::DroongaEngineService
- Inherits:
-
Object
- Object
- Droonga::Command::DroongaEngineService
- Includes:
- Loggable
- Defined in:
- lib/droonga/command/droonga_engine_service.rb
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize ⇒ DroongaEngineService
constructor
A new instance of DroongaEngineService.
- #run(command_line_arguments) ⇒ Object
Constructor Details
#initialize ⇒ DroongaEngineService
Returns a new instance of DroongaEngineService.
38 39 40 41 42 43 44 45 |
# File 'lib/droonga/command/droonga_engine_service.rb', line 38 def initialize @engine_name = nil @listen_fd = nil @heartbeat_fd = nil @contrtol_read_fd = nil @contrtol_write_fd = nil @contrtol_write_closed = false end |
Class Method Details
.run(command_line_arguments) ⇒ Object
31 32 33 |
# File 'lib/droonga/command/droonga_engine_service.rb', line 31 def run(command_line_arguments) new.run(command_line_arguments) end |
Instance Method Details
#run(command_line_arguments) ⇒ Object
47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 |
# File 'lib/droonga/command/droonga_engine_service.rb', line 47 def run(command_line_arguments) create_new_process_group parse_command_line_arguments!(command_line_arguments) PluginLoader.load_all control_write_io = IO.new(@control_write_fd) success = true begin run_services rescue logger.exception("failed to run services", $!) success = false ensure shutdown_worker_process_agent end success end |