打印日志

dev_daiao
daiao 5 years ago
parent d966552252
commit ed6e1150f2

@ -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}")

Loading…
Cancel
Save