|
|
|
@ -77,10 +77,11 @@ class Admins::CheckShixunMirrorsService < ApplicationService
|
|
|
|
|
@_bridge_images ||= begin
|
|
|
|
|
url = EduSetting.get('cloud_bridge')
|
|
|
|
|
res = Faraday.get(url)
|
|
|
|
|
res_body = JSON.parse(res.body)
|
|
|
|
|
|
|
|
|
|
raise Error, '拉取镜像信息异常' if res && res['code'].to_i != 0
|
|
|
|
|
raise Error, '拉取镜像信息异常' if res_body && res_body['code'].to_i != 0
|
|
|
|
|
|
|
|
|
|
res
|
|
|
|
|
res_body
|
|
|
|
|
rescue => e
|
|
|
|
|
Rails.logger.error("get response failed ! #{e.message}")
|
|
|
|
|
raise Error, '实训云平台繁忙(繁忙等级:84)'
|
|
|
|
|