Class: GroongaQueryLog::Command::CheckCrash::ProcessEnumerator

Inherits:
Object
  • Object
show all
Defined in:
lib/groonga-query-log/command/check-crash.rb

Instance Method Summary collapse

Constructor Details

#initialize(general_log_paths) ⇒ ProcessEnumerator

Returns a new instance of ProcessEnumerator.



463
464
465
466
# File 'lib/groonga-query-log/command/check-crash.rb', line 463

def initialize(general_log_paths)
  @general_log_paths = general_log_paths
  @running_processes = {}
end

Instance Method Details

#each(&block) ⇒ Object



468
469
470
471
472
473
474
475
476
477
478
# File 'lib/groonga-query-log/command/check-crash.rb', line 468

def each(&block)
  general_log_parser = GroongaLog::Parser.new
  general_log_parser.parse_paths(@general_log_paths) do |entry|
    check_general_log_entry(general_log_parser.current_path,
                            entry,
                            &block)
  end
  @running_processes.each_value do |process|
    yield(process)
  end
end