Class: Droonga::Command::Remote::AddReplicas
- Inherits:
-
ModifyReplicasBase
- Object
- Base
- ModifyReplicasBase
- Droonga::Command::Remote::AddReplicas
- Defined in:
- lib/droonga/command/remote.rb
Instance Attribute Summary
Attributes inherited from Base
Instance Method Summary collapse
Methods inherited from Base
Constructor Details
This class inherits a constructor from Droonga::Command::Remote::Base
Instance Method Details
#process ⇒ Object
334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 |
# File 'lib/droonga/command/remote.rb', line 334 def process return if dataset.nil? or hosts.nil? added_hosts = hosts - [host] log("adding replicas: #{added_hosts.join(",")}") return if added_hosts.empty? CatalogModifier.modify do |modifier, file| modifier.datasets[dataset].replicas.hosts += added_hosts modifier.datasets[dataset].replicas.hosts.uniq! @service_installation.(file) end @serf.join(*added_hosts) end |