lib/arii/agent.rb in arii-1.0.6 vs lib/arii/agent.rb in arii-1.0.7

- old
+ new

@@ -78,10 +78,11 @@ rescue Exception => e ARII::Config.log.error(self.class.name) {"Detection error: #{e}"} end begin + puts @checkup if @checkup[:status] == 100 then process @checkup end rescue Exception => e ARII::Config.log.error(self.class.name) {"Process error: #{e}"} @@ -97,14 +98,16 @@ def process checkup begin checkup[:templates].each do |template| ARII::Config.log.info(self.class.name) {"Delivering to #{template} template."} checkup[:payload].each do |payload| + puts "payload #{payload}" ARII::Config.log.debug(self.class.name) {"Processing #{payload}."} response = RestClient.post "#{ARII::Config.host}postman/deliver/#{template}.js", payload + puts response case response.code when 200 - + ARII::Config.log.debug(self.class.name) {"Delivered to #{tempalte}."} else ARII::Config.log.warn(self.class.name) {"unable to deliver \"#{payload}\" to \"#{template}\""} end end end \ No newline at end of file