lib/jamf/api/classic/base_classes/advanced_search.rb in ruby-jss-2.0.0a11 vs lib/jamf/api/classic/base_classes/advanced_search.rb in ruby-jss-2.0.0b1
- old
+ new
@@ -187,11 +187,11 @@
#
def create(get_results = false)
raise Jamf::InvalidDataError, 'Jamf::Criteriable::Criteria instance required' unless @criteria.is_a? Jamf::Criteriable::Criteria
raise Jamf::InvalidDataError, 'display_fields must be an Array.' unless @display_fields.is_a? Array
- orig_timeout = @cnx.cnx.options[:timeout]
+ orig_timeout = @cnx.timeout
@cnx.timeout = 1800
super()
requery_search_results if get_results
@cnx.timeout = orig_timeout
@@ -205,11 +205,11 @@
# @param get_results[Boolean] should the results of the search be queried immediately?
#
# @return [Integer] the id of the updated search
#
def update(get_results = false)
- orig_timeout = @cnx.cnx.options[:timeout]
+ orig_timeout = @cnx.timeout
@cnx.timeout = 1800
super()
requery_search_results if get_results
@cnx.timeout = orig_timeout
@@ -233,11 +233,11 @@
# This can be very slow, so temporarily reset the API timeout to 30 minutes
#
# @return [Array<Hash>] the new search results
#
def requery_search_results
- orig_open_timeout = @cnx.cnx.options[:open_timeout]
- orig_timeout = @cnx.cnx.options[:timeout]
+ orig_open_timeout = @cnx.open_timeout
+ orig_timeout = @cnx.timeout
@cnx.timeout = 1800
@cnx.open_timeout = 1800
begin
requery = self.class.fetch(id: @id)
@search_results = requery.search_results