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