Class: Falcon::Command::Supervisor::Metrics

Inherits:
Samovar::Command
  • Object
show all
Defined in:
lib/falcon/command/supervisor.rb

Overview

Implements the `falcon supervisor metrics` command.

Instance Method Summary collapse

Instance Method Details

#call(stream) ⇒ Object

Send the metrics message to the supervisor and print the results.



59
60
61
62
63
64
# File 'lib/falcon/command/supervisor.rb', line 59

def call(stream)
	stream.puts({please: 'metrics'}.to_json, separator: "\0")
	response = JSON.parse(stream.gets("\0"), symbolize_names: true)
	
	pp response
end