lib/splunk_search.rb
# when called, returns the percentage of the search completed
when called, returns the percentage of the search completed
when called returns the percentage of the search completed
def percent_complete
        xml = @client.get_request("/services/search/jobs/#{@sid}")
        doc = Nokogiri::XML(xml)
        progress = doc.xpath("//s:key[@name='doneProgress']").text
        return "#{progress}/1.0"
    end
def percent_complete xml = @client . get_request ( "/services/search/jobs/#{@sid}" ) doc = Nokogiri :: XML ( xml ) progress = doc . xpath ( "//s:key[@name='doneProgress']" ) . text return "#{progress}/1.0" end
when called, returns the percentage of the search completed
when called returns the percentage of the search completed