Class: GroongaQueryLog::ServerVerifier

Inherits:
Object
  • Object
show all
Defined in:
lib/groonga-query-log/server-verifier.rb

Defined Under Namespace

Classes: GroongaOptions, Options

Instance Method Summary collapse

Constructor Details

#initialize(options) ⇒ ServerVerifier

Returns a new instance of ServerVerifier.



28
29
30
31
32
# File 'lib/groonga-query-log/server-verifier.rb', line 28

def initialize(options)
  @options = options
  @queue = SizedQueue.new(@options.request_queue_size)
  @events = Queue.new
end

Instance Method Details

#verify(input, &callback) ⇒ Object



34
35
36
37
38
39
40
41
42
43
# File 'lib/groonga-query-log/server-verifier.rb', line 34

def verify(input, &callback)
  @same = true
  @client_error_is_occurred = false
  producer = run_producer(input, &callback)
  reporter = run_reporter
  producer.join
  @events.push(nil)
  reporter.join
  success?
end