Class: Droonga::Serf::RemoteCommand::Unjoin
- Inherits:
-
ModifyReplicasBase
- Object
- Base
- ModifyReplicasBase
- Droonga::Serf::RemoteCommand::Unjoin
- Defined in:
- lib/droonga/serf/remote_command.rb
Instance Attribute Summary
Attributes inherited from Base
Instance Method Summary collapse
Methods inherited from Base
#initialize, #log, #should_process?
Constructor Details
This class inherits a constructor from Droonga::Serf::RemoteCommand::Base
Instance Method Details
#process ⇒ Object
316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 |
# File 'lib/droonga/serf/remote_command.rb', line 316 def process return if dataset.nil? or hosts.nil? log("unjoining replicas: #{hosts.join(",")}") log("unjoining from the cluster") Catalog::Modifier.new(catalog).modify do |modifier, file| if unjoining_node? modifier.datasets[dataset].replicas.hosts = hosts else modifier.datasets[dataset].replicas.hosts -= hosts end @service_installation.(file) end log("done") end |