From ed6e1150f275913ed83ebc3faf732cb0db25e986 Mon Sep 17 00:00:00 2001 From: daiao <358551898@qq.com> Date: Mon, 9 Dec 2019 10:25:43 +0800 Subject: [PATCH] =?UTF-8?q?=E6=89=93=E5=8D=B0=E6=97=A5=E5=BF=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/services/admins/check_shixun_mirrors_service.rb | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/app/services/admins/check_shixun_mirrors_service.rb b/app/services/admins/check_shixun_mirrors_service.rb index 8334df485..85069ebc2 100644 --- a/app/services/admins/check_shixun_mirrors_service.rb +++ b/app/services/admins/check_shixun_mirrors_service.rb @@ -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}")