Class: Droonga::Command::Remote::UpdateLiveNodes

Inherits:
Base
  • Object
show all
Defined in:
lib/droonga/command/remote.rb

Instance Attribute Summary

Attributes inherited from Base

#response

Instance Method Summary collapse

Methods inherited from Base

#initialize, #should_process?

Constructor Details

This class inherits a constructor from Droonga::Command::Remote::Base

Instance Method Details

#processObject



387
388
389
390
391
392
393
394
395
# File 'lib/droonga/command/remote.rb', line 387

def process
  path = Path.live_nodes
  nodes = live_nodes
  file_contents = JSON.pretty_generate(nodes)
  SafeFileWriter.write(path) do |output, file|
    output.puts(file_contents)
    @service_installation.ensure_correct_file_permission(file)
  end
end