|
|
|
@ -78,9 +78,8 @@ class Admins::CheckShixunMirrorsService < ApplicationService
|
|
|
|
|
url = EduSetting.get('cloud_bridge')
|
|
|
|
|
res = Faraday.get(url)
|
|
|
|
|
res_body = JSON.parse(res.body)
|
|
|
|
|
|
|
|
|
|
raise Error, '拉取镜像信息异常' if res_body && res_body['code'].to_i != 0
|
|
|
|
|
|
|
|
|
|
Rails.logger.info("######res_body:#{res_body}")
|
|
|
|
|
raise Error, '拉取镜像信息异常' if res_body && res_body['code'].nonzero?
|
|
|
|
|
res_body
|
|
|
|
|
rescue => e
|
|
|
|
|
Rails.logger.error("get response failed ! #{e.message}")
|
|
|
|
|