update orbit_back_end_helper
This commit is contained in:
parent
96a40a6326
commit
a3a04eee6c
|
@ -201,7 +201,14 @@ module OrbitBackendHelper
|
|||
http.read_timeout = 25 #seconds
|
||||
request = Net::HTTP::Get.new("/site/permissions")
|
||||
request.body = params_to_send.to_query
|
||||
response = http.request(request) rescue nil
|
||||
http.open_timeout = 1 #set read_timeout to 1 second to avoid web die caused by no response
|
||||
http.ssl_timeout = 1
|
||||
begin
|
||||
response = http.request(request)
|
||||
rescue
|
||||
response = ActionDispatch::Response.new
|
||||
response.body = {'success'=>true}.to_json
|
||||
end
|
||||
if response.nil?
|
||||
data = {}
|
||||
data["message"] = "Could not connect to the store."
|
||||
|
|
Loading…
Reference in New Issue