add 4 sec timeout to restclient
This commit is contained in:
parent
53b38a3bca
commit
648614aea5
1 changed files with 1 additions and 1 deletions
|
|
@ -3,7 +3,7 @@ module Jobs
|
|||
@queue = :http
|
||||
def self.perform(url, body, tries_remaining)
|
||||
begin
|
||||
RestClient.post(url, :xml => body){ |response, request, result, &block|
|
||||
RestClient.post(url, :xml => body, :timeout => 4){ |response, request, result, &block|
|
||||
if [301, 302, 307].include? response.code
|
||||
response.follow_redirection(request, result, &block)
|
||||
else
|
||||
|
|
|
|||
Loading…
Reference in a new issue