|
|
|
@ -1187,7 +1187,9 @@ module ApplicationHelper
|
|
|
|
|
end
|
|
|
|
|
res
|
|
|
|
|
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})")
|
|
|
|
|
end
|
|
|
|
|
end
|
|
|
|
@ -1198,7 +1200,7 @@ module ApplicationHelper
|
|
|
|
|
res = Net::HTTP.get_response(uri).body
|
|
|
|
|
res = JSON.parse(res)
|
|
|
|
|
rescue => e
|
|
|
|
|
logger.error("get response failed ! #{e}")
|
|
|
|
|
logger.error("get response failed ! #{e.message}")
|
|
|
|
|
raise("实训云平台繁忙(繁忙等级:84)")
|
|
|
|
|
end
|
|
|
|
|
end
|
|
|
|
|