Navigation Menu

Skip to content

Commit

Permalink
Reduce scope
Browse files Browse the repository at this point in the history
  • Loading branch information
kou committed Oct 27, 2017
1 parent 0ad23b7 commit 46007d8
Showing 1 changed file with 13 additions and 12 deletions.
25 changes: 13 additions & 12 deletions lib/groonga/client/command-line/groonga-client-index-check.rb
Expand Up @@ -35,18 +35,19 @@ def initialize
def run(argv)
targets = parse_command_line(argv)

@client = Client.new(:url => @url,
:protocol => @protocol,
:host => @host,
:port => @port,
:backend => :synchronous)
options = {
:check_missing_source => @check_missing_source,
:check_index_integrity => @check_index_integrity,
:target => targets
}
checker = Checker.new(@client, options)
checker.check
Client.open(:url => @url,
:protocol => @protocol,
:host => @host,
:port => @port,
:backend => :synchronous) do |client|
options = {
:check_missing_source => @check_missing_source,
:check_index_integrity => @check_index_integrity,
:target => targets
}
checker = Checker.new(client, options)
checker.check
end
end

private
Expand Down

0 comments on commit 46007d8

Please sign in to comment.