Class: Droonga::Command::DroongaEngine

Inherits:
Object
  • Object
show all
Defined in:
lib/droonga/command/droonga_engine.rb

Defined Under Namespace

Classes: CommandRunner, Configuration, MainLoop, ServiceRunner

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeDroongaEngine

Returns a new instance of DroongaEngine.



42
43
44
45
# File 'lib/droonga/command/droonga_engine.rb', line 42

def initialize
  @configuration = Configuration.new
  @log_output = nil
end

Class Method Details

.run(command_line_arguments) ⇒ Object



37
38
39
# File 'lib/droonga/command/droonga_engine.rb', line 37

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
# File 'lib/droonga/command/droonga_engine.rb', line 47

def run(command_line_arguments)
  parse_command_line_arguments!(command_line_arguments)

  setup_path

  if @configuration.daemon?
    Process.daemon
  end

  open_log_file do
    write_pid_file do
      run_main_loop
    end
  end
end