A new instance of Poller.
Returns a new instance of Poller.
5 6 7
# File 'lib/nfagent/poller.rb', line 5 def initialize @info = Info.new end
9 10 11 12 13 14 15 16
# File 'lib/nfagent/poller.rb', line 9 def send_heartbeat payload = @info.to_hash Log.info("Polling: #{payload.inspect}") response = Client.post(:poller, payload) if !response.ok? Log.error("Poll Failed: #{response.message}") end end