lib/arii/sqldetector.rb in arii-1.0.4 vs lib/arii/sqldetector.rb in arii-1.0.5

- old
+ new

@@ -13,25 +13,21 @@ public ## # == Detect the changes # def detect object - puts "object #{object}" - #puts "agent #{@agent}" ARII::Config.log.debug(self.class.name) {"Monitoring #{object[:host]}"} begin @client = Mysql2::Client.new(:host => object[:host], :username => object[:username] , :password => object[:password] , :database => object[:database]) - puts object[:query] @client.query(object[:query]).each(:symbolize_keys => false) do |row| - puts row unless object[:cache].nil? then @response = Cashier.verify row[object[:cache]], object, row, object[:seed] else @response = Cashier.verify row["id"], object, row, object[:seed] end + puts @response # Process ARII cache response - puts response @cache = JSON.parse(@response, {:symbolize_names => true}) unless @cache[:templates].nil? then @cache[:templates].each do |t| @templates.push t end