Lower timeout for API Entreprise
This commit is contained in:
parent
0fda88512c
commit
5ae8eb3383
1 changed files with 3 additions and 1 deletions
|
@ -8,6 +8,8 @@ class ApiEntreprise::API
|
||||||
EXERCICES_RESOURCE_NAME = "exercices"
|
EXERCICES_RESOURCE_NAME = "exercices"
|
||||||
RNA_RESOURCE_NAME = "associations"
|
RNA_RESOURCE_NAME = "associations"
|
||||||
|
|
||||||
|
TIMEOUT = 10
|
||||||
|
|
||||||
def initialize
|
def initialize
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -34,7 +36,7 @@ class ApiEntreprise::API
|
||||||
response = Typhoeus.get(url,
|
response = Typhoeus.get(url,
|
||||||
ssl_verifypeer: false,
|
ssl_verifypeer: false,
|
||||||
params: params,
|
params: params,
|
||||||
timeout: 20)
|
timeout: TIMEOUT)
|
||||||
|
|
||||||
if response.success? && response.code != 206
|
if response.success? && response.code != 206
|
||||||
JSON.parse(response.body, symbolize_names: true)
|
JSON.parse(response.body, symbolize_names: true)
|
||||||
|
|
Loading…
Reference in a new issue