Skip to content

Commit

Permalink
Adding timeouts
Browse files Browse the repository at this point in the history
  • Loading branch information
gabriel committed Dec 14, 2012
1 parent 551bec7 commit f626cbc
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions lib/swiftype/request.rb
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,9 @@ def request(method, path, params, options)
request.path = path
request.body = ::JSON.dump(params) unless params.empty?
end

request.options[:timeout] = 120
request.options[:open_timeout] = 5
end
options[:raw] ? response : response.body
end
Expand Down

0 comments on commit f626cbc

Please sign in to comment.