Class: Groonga::Client::CommandLine::GroongaClientIndexRecreate
- Inherits:
-
Object
- Object
- Groonga::Client::CommandLine::GroongaClientIndexRecreate
- Defined in:
- lib/groonga/client/command-line/groonga-client-index-recreate.rb
Defined Under Namespace
Classes: Recreator
Instance Method Summary collapse
-
#initialize ⇒ GroongaClientIndexRecreate
constructor
A new instance of GroongaClientIndexRecreate.
- #run(arguments) ⇒ Object
Constructor Details
#initialize ⇒ GroongaClientIndexRecreate
Returns a new instance of GroongaClientIndexRecreate.
27 28 29 30 31 |
# File 'lib/groonga/client/command-line/groonga-client-index-recreate.rb', line 27 def initialize @interval = :day @n_workers = 0 end |
Instance Method Details
#run(arguments) ⇒ Object
33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 |
# File 'lib/groonga/client/command-line/groonga-client-index-recreate.rb', line 33 def run(arguments) parser = Parser.new(:read_timeout => -1) indexes = parser.parse(arguments) do |option_parser| parse_command_line(option_parser) end parser.open_client do |client| recreator = Recreator.new(client, @interval, indexes) recreator.run do @n_workers.times do client.database_unmap end end end end |