|
|
@ -1187,7 +1187,9 @@ module ApplicationHelper
|
|
|
|
end
|
|
|
|
end
|
|
|
|
res
|
|
|
|
res
|
|
|
|
rescue Exception => e
|
|
|
|
rescue Exception => e
|
|
|
|
Rails.logger.error("post failed! #{e}")
|
|
|
|
Rails.logger.error("post failed! #{e.message}")
|
|
|
|
|
|
|
|
# 增加错误栈信息
|
|
|
|
|
|
|
|
e.backtrace.each { |msg| Rails.logger.error(msg) }
|
|
|
|
raise("实训云平台繁忙(繁忙等级:#{status})")
|
|
|
|
raise("实训云平台繁忙(繁忙等级:#{status})")
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
@ -1198,7 +1200,7 @@ module ApplicationHelper
|
|
|
|
res = Net::HTTP.get_response(uri).body
|
|
|
|
res = Net::HTTP.get_response(uri).body
|
|
|
|
res = JSON.parse(res)
|
|
|
|
res = JSON.parse(res)
|
|
|
|
rescue => e
|
|
|
|
rescue => e
|
|
|
|
logger.error("get response failed ! #{e}")
|
|
|
|
logger.error("get response failed ! #{e.message}")
|
|
|
|
raise("实训云平台繁忙(繁忙等级:84)")
|
|
|
|
raise("实训云平台繁忙(繁忙等级:84)")
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|